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 751 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
0 answers
0 votes
0 answers
0 votes
1 answer
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,596 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
1,022 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
886 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,233 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,426 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
705 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