How do I add a filter and a slicer

0 votes

I have created a report with data slicers from (date) to (date)

While creating them one of its visualizations is a gauge and it shows total sales until last dates from early target.

This model has a target table namely monthly target, dimdatestable and sales table.

In order to use an yearly target I have created this DAX measure:

yearly_target = CALCULATE(SUMX(Targests,'Targests'[Target $]),ALLEXCEPT(dimDate,'dimDate'[year]))

I am not sue if the DAX solution is appropriate for the following data

year yearly_target total sales
2018 5,780,575 67,025
Total 10,330,575 366,025
May 22, 2019 in Power BI by Phalguni
• 1,020 points

edited May 23, 2019 by Omkar 723 views

1 answer to this question.

0 votes

Hi,

Its OLTP and DW modeling. However, you can try the following DAX function for the same.

yearly_target_New=

VAR yearly_target = CALCULATE(SUMX(Targests,'Targests'[Target $]),ALLEXCEPT(dimDate,'dimDate'[year]))

VAR _table = SUMMARIZE('Targests',[year],"_Value",[yearly_target ])

RETURN

IF(HASONEVALUE([year]),[yearly_target],SUMX(_table,[_Value]))

Hope This Helps!!

answered May 23, 2019 by Avantika
• 1,520 points

edited May 23, 2019 by Omkar

Related Questions In Power BI

0 votes
1 answer

How do you add a slicer from different table in Power BI?

In order to add a slicer from ...READ MORE

answered Mar 5, 2019 in Power BI by Phalguni
• 1,020 points
1,546 views
0 votes
1 answer

I have a web API with basic authorisation and username and password. How do i connect to it in Power BI?

Hey, @There, I found your query is quite ...READ MORE

answered Oct 29, 2020 in Power BI by Gitika
• 65,890 points
3,515 views
0 votes
1 answer

How do I know who in my organization has a Power BI account?

You can view the Azure Active Directory ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 18,540 points
1,112 views
0 votes
1 answer

Install Power BI Desktop

It’s a pretty simple process. All you ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
998 views
0 votes
1 answer

Few tips before I start creating Power BI dashboard

It’s always advisable to begin with the data ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
864 views
0 votes
1 answer

How do I format the KPI in Power BI

format the KPI by selecting the paint ...READ MORE

answered Oct 9, 2018 in Power BI by Kalgi
• 52,350 points
1,209 views
+1 vote
1 answer
0 votes
1 answer

How do you add a new filter pane in old Power BI reports?

Hi, You can perform the following steps: 1. Open ...READ MORE

answered May 22, 2019 in Power BI by Avantika
• 1,520 points
1,407 views
0 votes
1 answer

How do I create a line chart?

Hi, From the data mentioned above, you can ...READ MORE

answered May 10, 2019 in Power BI by Avantika
• 1,520 points
684 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP