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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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