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

Report Filter doesn't work for Measure if that filter is used in CALCULATE

I have the following tables:

  • Fact ticket sales for product groups (A & B)
  • Fact ticket scans for product groups (A & B)
  • Dim product groups (A & B)

 

I've calculated a new measure with CALCULATE:

Measure Travel = Calculate(Ticket Scans, Ticket Group = A)+Calculate(Ticket Sales, Ticket Group = B)

(Answer total= 1000, where A contributes 300, and B 700).

 

If I try to show the measure on the bar chart and use the product group dimension as a lable,  I get the same height bars (1000 for both Group A and Group B).   Same for the table visual - all group types, including  the total, show 1000. 

 

Visual Example: the first table shows the above calculated measure where Legend uses the Ticket Group dimension. As you see, it shows same value for both (Type A & B). While I need a result as per second bar chart. 

 

PBI problem example 2.jpg

 Simplified table visual example:

PBI problem example.JPG

 

I would expect that the calculated measure splits correctly by contributing dimension values. Is there a better formula to use than CALCULATE.

 

Thank You, 

 

Dovi

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

OK - I got it know. Had to use FILTER function, not the CALCULATE one, due to filter context. 

 

🙂 

 

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Tough to follow. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

OK - I got it know. Had to use FILTER function, not the CALCULATE one, due to filter context. 

 

🙂 

 

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.