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
AmiraBedh
Resident Rockstar
Resident Rockstar

Best practice when creating a measure

I have a measure I use in an clustered column chart, the syntax is below :

CalculateTickets = COUNT(FactTable[TicketSK])

In the chart I added the Status as an axis and I want to add a card for the total of each status

What is the best approach between :

- Use the same measure and apply a filter on the card based on the Status dimension

-Create a new measure like below :

CalculateTickets Test=
CALCULATE ([CalculateTickets], DimStatus[StatusLabel] ="On Hold")

 

What is the best approach and why ?

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AmiraBedh , Having 1 or 2-level measure looping is fine ( measure used inside measure)

 

But you need sure about the difference between

CalculateTickets Test=
CALCULATE ([CalculateTickets], DimStatus[StatusLabel] ="On Hold")

 

and

 

CalculateTickets Test=
CALCULATE ([CalculateTickets], Filter(DimStatus, DimStatus[StatusLabel] ="On Hold"))

 

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@AmiraBedh , Having 1 or 2-level measure looping is fine ( measure used inside measure)

 

But you need sure about the difference between

CalculateTickets Test=
CALCULATE ([CalculateTickets], DimStatus[StatusLabel] ="On Hold")

 

and

 

CalculateTickets Test=
CALCULATE ([CalculateTickets], Filter(DimStatus, DimStatus[StatusLabel] ="On Hold"))

 

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

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.

Top Solution Authors