Forum Discussion
Replacing Subtotal Values
- 4 years ago
Hi Anonymous ,
You can use IF condition to check if the matrix is filtered by brand/make. If yes, you can fill it up with some other value.
Sample DAX:
IF(ISINSCOPE([Brand/Make], (Add your new value here), [Price])
Regards,Kishore
- Anonymous4 years ago
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure_Result1 = IF( HASONEVALUE('Table'[Group1])&&NOT(HASONEVALUE('Table'[Group2]))&&MAX('Table'[Group1])="1" , CALCULATE(SUM('Table'[Column_Amount]),FILTER(ALL('Table'), 'Table'[Brand]="BWM"&&'Table'[Group1]=MAX('Table'[Group1])&&'Table'[Group2]=MAX('Table'[Group2]))) ,MAX('Table'[Price]))Measure_Result2 = IF( HASONEVALUE('Table'[Group1])&&NOT(HASONEVALUE('Table'[Group2])), SQRT( SUMX( FILTER(ALL('Table'),'Table'[Brand]=MAX('Table'[Brand])&&'Table'[Group1]=MAX('Table'[Group1])),[Price])),MAX('Table'[Price]))2. Result.
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure_Result1 =
IF(
HASONEVALUE('Table'[Group1])&&NOT(HASONEVALUE('Table'[Group2]))&&MAX('Table'[Group1])="1"
,
CALCULATE(SUM('Table'[Column_Amount]),FILTER(ALL('Table'),
'Table'[Brand]="BWM"&&'Table'[Group1]=MAX('Table'[Group1])&&'Table'[Group2]=MAX('Table'[Group2])))
,MAX('Table'[Price]))
Measure_Result2 =
IF(
HASONEVALUE('Table'[Group1])&&NOT(HASONEVALUE('Table'[Group2])),
SQRT( SUMX(
FILTER(ALL('Table'),'Table'[Brand]=MAX('Table'[Brand])&&'Table'[Group1]=MAX('Table'[Group1])),[Price])),MAX('Table'[Price]))
2. Result.
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Thankyou your solution worked 😊