This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi
I have a table where I wish to calculate the index (this year compared to last year) for the total correctly with a measure where it returns 200 at the moment. I want the measure to return 167:
| Store Number | Retail Sales Amount LCY | Retail Sales Amount LCY LY | Index |
| 1 | 100 | 100 | 100 |
| 2 | 400 | 200 | 200 |
| 3 | 300 | ||
| Total | 600 | 300 | 200 (Incorrectly) - should be 167 |
Currently Im using the following measure which returns the above incorrect result :
New All Store Sales LCY Index =
SWITCH (
TRUE (),
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 < 2000
&& DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 > -100,
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100,
BLANK ()
)
I tried to solved it by using this measure but get an error;
New All Store Sales LCY Index =
IF(HASONEFILTER('dm DimStore'[Store Number]),
IF(
SWITCH (
TRUE (),
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 < 2000
&& DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 > -100,
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100,
BLANK ()),
0,
SWITCH (
TRUE (),
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 < 2000
&& DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 > -100,
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100,
BLANK ()
)),
FILTER(
'dm DimStore',
SWITCH (
TRUE (),
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 < 2000
&& DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100 > -100,
DIVIDE ( [Retail Sales Amount Incl VAT LCY], [New All Store Sales LCY LY] ) * 100,
BLANK ()
)))
Best regards,
Mikkel
Thanks for the answer, @Anonymous
I tried this measure but it returns blank in total:
New Sales L4L Index =
VAR __table =
SUMMARIZE (
'dm FactRetailSales',
'dm DimStore'[Store Number],
"__value",
SWITCH (
TRUE (),
DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100 < 2000
&& DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100 > -100, DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100,
BLANK ()
)
)
RETURN
IF (
HASONEVALUE ( 'dm DimStore'[Store Number] ),
SWITCH (
TRUE (),
DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100 < 2000
&& DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100 > -100, DIVIDE ( [New L4L Sales LCY], [New L4L Sales LY LCY] ) * 100,
BLANK ()
),
SUMX ( __table, [__value] )
)
HI @MIkkelHyldig,
According to your description, it sounds like a common measure total level calculation issue. You can refer to Greg's blog to know how to handle this scenario:
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 21 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 55 | |
| 53 | |
| 45 | |
| 26 | |
| 24 |