Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
My pseudodata looks like this:
group item no. total sales
A 100 1250
A 110 48909
A 120 56015
B 220 6105
B 230 50189
B 245 15199
C 309 1016
C 308 1099
C 366 1019
etc.
and I want to put it on a chart, but I only want to show a single group at a time.
I have a "group" slicer, a new measure:
Total sales = if(isfiltered(DATASOURCE[group]), calculate(sum(DATASOURCE[Total sales])), 0)
and a chart which displays "Total sales" by "item no.".
This all works fine when I have selected something in the "group" slicer, but I want the chart to be blank unless something is selected. At the moment, if nothing is selected in the "group" slicer, the chart contains everything i.e. all my item no.s, with blanks in every "Total sales".
I can add a filter to the chart itself so that it only displays in the chart if sales is > 0, but ideally I want zero sales too.
Any ideas?
Solved! Go to Solution.
HI @AndrewPF ,
Pls test the below:
isfilter = CALCULATE (IF ( ISFILTERED ( 'Table'[Group] ), 1, 0 ),
ALLSELECTED ( 'Table')
)
Out put result:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Lucien
HI @AndrewPF ,
Pls test the below:
isfilter = CALCULATE (IF ( ISFILTERED ( 'Table'[Group] ), 1, 0 ),
ALLSELECTED ( 'Table')
)
Out put result:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Lucien
I think I get where you're coming from this, but I get the error message:
"The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scalar Value."
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.