Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate measure to get data for selected filter remaining should show 0

I want to create a measure which will have data similar to Column "Plan1" and "Plan2" based on the filter selections.

 

The point to note here is-

Filters: "Plan1" and "Plan 2"

Grid: "Plan" is pulled from the same table and are the same column.

data that needs to be calculated is bordered with red.

 

p1p2.PNG

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

To reproduce your problem, 

1. I create a main data table (Sheet7) and calendar date table (date table) as below

11.png

 

2. create measure and calculated column to get a table as yours

12.png

 

3. create two new table

date1 = SUMMARIZE('date table','date table'[month'year])

date2 = SUMMARIZE('date table','date table'[month'year])

Note: don't create any relationship for the two tables

Then add "month'year" from these two tables in the slicers

 

3.create measures in Sheet7

plan1 = SELECTEDVALUE(date1[month'year])

plan2 = SELECTEDVALUE(date2[month'year])

plan1 sales = IF(MAX(Sheet7[plan calculated column])=[plan1],[Measure_sales],0)

plan2 sales = IF(MAX(Sheet7[plan calculated column])=[plan2],[Measure_sales],0)

9.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Best Regards

Maggie

v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

To reproduce your problem, 

1. I create a main data table (Sheet7) and calendar date table (date table) as below

11.png

 

2. create measure and calculated column to get a table as yours

12.png

 

3. create two new table

date1 = SUMMARIZE('date table','date table'[month'year])

date2 = SUMMARIZE('date table','date table'[month'year])

Note: don't create any relationship for the two tables

Then add "month'year" from these two tables in the slicers

 

3.create measures in Sheet7

plan1 = SELECTEDVALUE(date1[month'year])

plan2 = SELECTEDVALUE(date2[month'year])

plan1 sales = IF(MAX(Sheet7[plan calculated column])=[plan1],[Measure_sales],0)

plan2 sales = IF(MAX(Sheet7[plan calculated column])=[plan2],[Measure_sales],0)

9.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.