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 in Power BI by Phalguni
• 1,010 points

edited May 23 by Omkar 33 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 22 by Avantika
• 1,500 points

edited May 23 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 in Power BI by Phalguni
• 1,010 points
100 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
• 14,960 points
44 views
0 votes
1 answer

How to add slicer from a different tables?

Hi, Join is normally performed to get ...READ MORE

answered Mar 1 in Power BI by Cherukuri
• 26,880 points
359 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
• 41,170 points
43 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
• 41,170 points
79 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
• 41,170 points
57 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 in Power BI by Avantika
• 1,500 points
126 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 in Power BI by Avantika
• 1,500 points
32 views