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
• 970 points

edited May 23 by Omkar 21 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,460 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
• 970 points
33 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,080 points
28 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
• 15,820 points
107 views
0 votes
1 answer

How do I calculate difference between consecutive rows and columns?

There are two ways through which you ...READ MORE

answered May 20 in Power BI by Avantika
• 1,460 points
31 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
• 36,920 points
31 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
• 36,920 points
67 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
• 36,920 points
44 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,460 points
25 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,460 points
18 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.