Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a measure in Power BI, it's all ok, but I want to force the grand total so it can be 100%.
Any ideas?
Here is the measure:
Measure = IF(CALCULATE(SUM(table[ValChannel]),ALLEXCEPT(table,TABLE[Channel]))=0,(SUMX(
SUMMARIZE(TABLE,TABLE[IdBussiness],TABLE[Date],
"MaxSubtotal", MIN(TABLE[S])),[MaxSubtotal]) / CALCULATE(SUMX(
SUMMARIZE(TABLE,TABLE[IdBusiness],TABLE[Date],
"MaxSubtotal", MAX(TABLE[D])),[MaxSubtotal]),ALLSELECTED(TABLE[SEG]),ALLSELECTED(TABLE[FA]),ALLSELECTED(TABLE[Brand]),ALLSELECTED(TABLE[PRES]),ALLSELECTED(TABLE[TAM]))))
Solved! Go to Solution.
Hi @Alessandra,
Based on your formula, it seems like you are try to calculate on summarized 'min total ' value and 'max total' value who filtered by current row contents, right?
If this is a case, you can take a look at below measure if it suitable for your requirement.
Sample:
SSN = VAR summaried = SUMMARIZE ( ALLSELECTED ( table ), table[CodigoNegocio], table[FechaD], "MinSubtotal", MIN ( table[SSTPESO] ), "MaxSubtotal", MAX ( table[DSTPESO] ) ) RETURN IF ( HASONEVALUE ( table[SEGMENTOS] ), DIVIDE ( SUMX ( FILTER ( summaried, [SEGMENTOS] = SELECTEDVALUE ( table[SEGMENTOS] ) ), [MinSubtotal] ), SUMX ( FILTER ( summaried, [SEGMENTOS] = SELECTEDVALUE ( table[SEGMENTOS] ) ), [MaxSubtotal] ), 0 ), 1 )
Regards,
Xiaoxin Sheng
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |