Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm trying to create a table in Power BI that, at its core, displayed the frequency with which certain items are purchased. This data is being pulled from MS SQL and looks something like this:
From there, various calculations will be applied to each row. My trouble is that those calculations (measures) still need to run on the rows where the frequency of a given quantity was 0. Thus, what I figure I'm needing to do is add rows with a frequency of 0 for all quantities from 1 to the max value for each item.
My immediate thought is that this is much like completing a table with dates by joining to a date table. While I suspect this is the right approach, I'm running into 2 issues:
So is there any way I can get the filtered table to include the omitted rows up to the max and populate it with 0's so the calculations will run?
Solved! Go to Solution.
Hi @JonV
You may try below measure:
Measure 2 = VAR a = MAXX ( ALLSELECTED ( Table1 ), Table1[Quantity] ) RETURN IF ( MAX ( 'Table'[Quantity] ) <= a, CALCULATE ( SUM ( Table1[Frequency] ) ) + 0 )
Regards,
Cherie
Hi @JonV
It seems you may create a measure like below. Attached the sample file. If it is not your case,please share the sample data and expected output.
How to Get Your Question Answered Quickly
Measure = CALCULATE(SUM(Table1[Frequency]))+0
Regards,
Cherie
Hi @JonV
I cannot fully understand it. Could you provide the simplified data and expected output for us?
How to Get Your Question Answered Quickly
Regards,
Cherie
Hi @JonV
You may try below measure:
Measure 2 = VAR a = MAXX ( ALLSELECTED ( Table1 ), Table1[Quantity] ) RETURN IF ( MAX ( 'Table'[Quantity] ) <= a, CALCULATE ( SUM ( Table1[Frequency] ) ) + 0 )
Regards,
Cherie
Hi @JonV
Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here.
Regards,
Cherie
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.