Forum Discussion
DAX formula help subtotals
Hi DLHGKreport ,
When more than one value is selected in the slicer, the filtering context will be more than one value, in which case the second parameter of SELECTEDVALUE will be returned, which defaults to blank (). So the following result will always return 0 when multiple selections are made.
-- Dynamic calculation for each Konto in the slicer
VAR RowValue =
SWITCH(
TRUE(),
SELECTEDVALUE('Vaardagen 2024'[Konto]) = "A1-Vaart", A1Pot_loss,
SELECTEDVALUE('Vaardagen 2024'[Konto]) = "A2-Vaart", A2Pot_loss,
SELECTEDVALUE('Vaardagen 2024'[Konto]) = "Disponibel", Disponibel_loss,
SELECTEDVALUE('Vaardagen 2024'[Konto]) = "Onderbezetting", Onderbezetting_loss,
SELECTEDVALUE('Vaardagen 2024'[Konto]) = "Reparatie", Reparatie_loss,
0
)
Please consider creating a pbix file with the simulated data and uploading it to a cloud drive and shared link, this will help us find the problem faster.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Posting the question in the appropriate forum will result in quicker support.
DAX Commands and Tips - Microsoft Fabric Community
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum