Forum Discussion
Anonymous
6 years agoNot applicable
Filter and selected all
Hey there, Right now Im stuck with an issue, we have a slicer with a "selected all" function, but my measure calculation wont work with it and shows either blank or a random value. Selected ...
v-yuta-msft
Community Support
6 years agoAnonymous ,
With the first part of the code, we secure that the user of the report select a year, but we also want to be able to select all groups with one click, but since that doesnt work in DAX, we have decided to try another solution.So if nothing is selected in the group slicer, the calculation should show a total of all groups.
Try modify the measure as below and check if it works:
Selected year =
IF (
AND ( HASONEVALUE ( NavOmsGrupper[gruppe] ); HASONEVALUE ( 'Calendar'[Year] ) );
CALCULATE ( SUM ( FinansTransaktioner[Belob] ) );
IF (
ISFILTERED ( 'Calendar'[Year] );
CALCULATE (
SUM ( FinansTransaktioner[Belob] );
FILTER ( ResourceGrupper; ResourceGrupper[Resource Gruppe (groups)] )
);
"select a year"
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
I modified it a little, I get a result, but it dosnt make sence, so if you have any solution it would be great.
"
Selected year = IF
( AND
( HASONEVALUE ( NavOmsGrupper[gruppe] ); HASONEVALUE ( 'Calendar'[Year] ) ); CALCULATE ( SUM ( FinansTransaktioner[Belob])); IF(HASONEVALUE('Calendar'[Year]); CALCULATE(SUM(FinansTransaktioner[Belob]);ALL(NavOmsGrupper[gruppe])); "Select year"))
"
- v-yuta-msft6 years ago
Community Support
Anonymous ,
Could you please share some sample data and clairfy more details about your requirement?
Regards,
Jimmy Tao