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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Help with a comparative measure

Hello everyone! I'm trying really hard to solve this issue, but i can't figure out how. 

I have a data set with column count : 

llopomo_0-1660584058937.png

 

When the month is filtered on calendar table, it expected to count how many time this value on Auxultimames occurs. So if i filter Jan-Feb-Mar

It shows 1 to 3

llopomo_1-1660584385916.png

I want to sum([peças_expostas]) only if the count is equal to the amount of itens selected in the month slicer. I want to do it dinamically.

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

HI:

 

You can try this:

First Measure:

# Rows in Dates = COUNTROWS( 'Dates' )
Second Measure = 
Month Equiv = ROUND(DIVIDE([# Rows in Dates],30.4),0)
 
Then you can compare your count of names with an IF Statement , something like
 Final = IF([pecas_expostas] = [Month Equiv], [Cout of Name], BLANK())
 
I hope this helps.
P.S. Your Date Table should be continuous, marked as Date Table and have relationship with your fact table.
 

View solution in original post

2 REPLIES 2
Whitewater100
Solution Sage
Solution Sage

HI:

 

You can try this:

First Measure:

# Rows in Dates = COUNTROWS( 'Dates' )
Second Measure = 
Month Equiv = ROUND(DIVIDE([# Rows in Dates],30.4),0)
 
Then you can compare your count of names with an IF Statement , something like
 Final = IF([pecas_expostas] = [Month Equiv], [Cout of Name], BLANK())
 
I hope this helps.
P.S. Your Date Table should be continuous, marked as Date Table and have relationship with your fact table.
 
Anonymous
Not applicable

It worked ! I've just changed a little bit, but the idea was correct.

pecas_expostas_comparative:=IF([Month Equiv] = COUNT(fact_share[CountColumn]),[sum peças_expostas],BLANK())

 

Many many tks ! 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.