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
Georgia_H
Helper I
Helper I

How to set the denominator to be used as a constant value for calculation

Hello,

Can anyone please help. Thank you.

 

Objective: I want to calculate the Avg Compliance % of Metrics_ID divided by the constant Denominator (unique count by LBU & Metrics_ID i.e. 12)

Issue: I am unable to get the denominator as 12 to be applied in my division.

 

2 Measures derived:

I derived this measure to get the Distinctcount of Metrics_ID in the dataset (used as denominator)

Denominator =

VAR Count_PCM_denominator=CALCULATE(DISTINCTCOUNT('rep F_ITS_MetricsLanding'[Metrics_ID]),FILTER('rep F_ITS_MetricsLanding','rep F_ITS_MetricsLanding'[Metrics_ID] in {"PCM01","PCM03","PCM04","PCM09","PCM10","PCM19","PCM20","PCM23","PCM33","PCM34","PCM35","PCM36"}),ALL('rep F_ITS_MetricsLanding'[Metrics_ID],'rep F_ITS_MetricsLanding'[LBU]))

RETURN Count_PCM_denominator

 

Compliance_Value (AVG) =
VAR numerator=CALCULATE(AVERAGE('rep F_ITS_MetricsLanding'[Compliance_Value]))
RETURN DIVIDE(numerator,'rep F_ITS_MetricsLanding'[Denominator])
 

Expected Results:

Expected Results for EILUX  
LBUMetrics_IDAvg Compliance %Denominator (unique by Metrics_ID)Expected Compliance_Value (AVG) divided by MAX Count of Denominator i.e. 12
EILUXPCM2360.10%125.00%
    5.00%

 

Expected Results for PCALKK  
LBUMetrics_IDAvg Compliance %Denominator (unique by Metrics_ID)Expected Compliance_Value (AVG) divided by MAX Count of Denominator i.e. 12
PCALKKPCM04100.00%128.33%
    8.33%

 

Expected Results for PAMC  
LBUMetrics_IDAvg Compliance %Denominator (unique by Metrics_ID)Expected Compliance_Value (AVG) divided by MAX Count of Denominator i.e. 12
PAMCPCM0178.80%126.57%
PAMCPCM0381.30%126.78%
PAMCPCM0462.10%125.18%
PAMCPCM0956.80%124.73%
PAMCPCM1059.60%124.97%
PAMCPCM1968.60%125.72%
PAMCPCM2055.90%124.66%
PAMCPCM2385.90%127.16%
PAMCPCM3365.00%125.42%
PAMCPCM3447.80%123.98%
PAMCPCM3557.10%124.76%
PAMCPCM3662.00%125.17%
    65.08%

 

Sample data:

LBUMetrics_IDAvg Compliance %Denominator (unique by Metrics_ID)
EILUXPCM2360.10%1
PAMCPCM0178.80%1
PAMCPCM0381.30%1
PAMCPCM0462.10%1
PAMCPCM0956.80%1
PAMCPCM1059.60%1
PAMCPCM1968.60%1
PAMCPCM2055.90%1
PAMCPCM2385.90%1
PAMCPCM3365.00%1
PAMCPCM3447.80%1
PAMCPCM3557.10%1
PAMCPCM3662.00%1
PCALKKPCM04100.00%1
   12
1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Georgia_H 

Thanks for reaching out to us.

You can try this measure,

Denominator = 

VAR Count_PCM_denominator=CALCULATE(DISTINCTCOUNT('rep F_ITS_MetricsLanding'[Metrics_ID]),FILTER(ALL('rep F_ITS_MetricsLanding'),'rep F_ITS_MetricsLanding'[Metrics_ID] in {"PCM01","PCM03","PCM04","PCM09","PCM10","PCM19","PCM20","PCM23","PCM33","PCM34","PCM35","PCM36"}))

RETURN Count_PCM_denominator

vxiaotang_0-1660721194273.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Georgia_H 

Thanks for reaching out to us.

You can try this measure,

Denominator = 

VAR Count_PCM_denominator=CALCULATE(DISTINCTCOUNT('rep F_ITS_MetricsLanding'[Metrics_ID]),FILTER(ALL('rep F_ITS_MetricsLanding'),'rep F_ITS_MetricsLanding'[Metrics_ID] in {"PCM01","PCM03","PCM04","PCM09","PCM10","PCM19","PCM20","PCM23","PCM33","PCM34","PCM35","PCM36"}))

RETURN Count_PCM_denominator

vxiaotang_0-1660721194273.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

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.