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! Learn more
Hello Folks,
I have a requirement as follows :
there are 3 values in slicer. Suppose the are A , B and C. If A gets selected then a measure value corresponding to A should be displayed and similarly with B and C. but if none of them gets slecteed then va;lue should be 20% of A + 60% of B + 20% of C this should be displayed.
any idea how can this be achieved? I tried using if else with filter but it says multiple columns used and does not give correct formula.
Thanks
Solved! Go to Solution.
You may refer to the DAX below.
Measure =
VAR s =
    SELECTEDVALUE ( Table1[Column1] )
RETURN
    IF (
        ISBLANK ( s ),
        SUMX (
            VALUES ( Table1[Column1] ),
            CALCULATE (
                SWITCH ( SELECTEDVALUE ( Table1[Column1] ), "A", 0.2, "B", 0.6, "C", 0.2 )
                    * SUM ( Table1[Column2] )
            )
        ),
        SUM ( Table1[Column2] )
    )
					
				
			
			
				
You may refer to the DAX below.
Measure =
VAR s =
    SELECTEDVALUE ( Table1[Column1] )
RETURN
    IF (
        ISBLANK ( s ),
        SUMX (
            VALUES ( Table1[Column1] ),
            CALCULATE (
                SWITCH ( SELECTEDVALUE ( Table1[Column1] ), "A", 0.2, "B", 0.6, "C", 0.2 )
                    * SUM ( Table1[Column2] )
            )
        ),
        SUM ( Table1[Column2] )
    )
					
				
			
			
				Hi @INJAINP could be done but we need to see your tables
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!  
Please, provide samplea data to help you better.
Regards,
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.