Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hi Team,
I have a slicer visualization with dropdown , which user should select only 2 columns(checkbox) , if the user tries to check on 3rd columns it should show a popup a warning message that "Please select only two columns" how can achieve this
I tried with below query but i cant able to achieve popup as well as differences between two columns
Differences =
VAR SelectedTests =
ALLSELECTED ( 'practice'[Description] )
VAR MinValue =
MINX ( SelectedTests, CALCULATE ( AVERAGE ( 'practice'[Time] ) ) )
VAR MaxValue =
MAXX ( SelectedTests, CALCULATE ( AVERAGE('practice'[Time] ) ) )
VAR Difference = MaxValue - MinValue
VAR NumProductsSelected =
COUNTROWS ( SelectedTests )
VAR Result =
IF (
NumProductsSelected = 2,
Difference,
ERROR ( "Please select only 2 Tests." )
)
RETURN
Result
could somebody please help me to achieve this
Solved! Go to Solution.
Hi @Anonymous ,
You need to drag the measure into the visual you want to slice and set the filter rules.
Attached PBIX file for reference.
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
@Anonymous , there is no way to stop, You can create a measure and display message .
You can make visuals blank if more then 2 values are there
if(countrows(allselected(Table[Product]) ) >=2, 1,0)
not you can use above measure to display message and remove data from visual , above should = 0 (visual level filter)
Hi Amit,
Thanks for your reply
May i know where exactly this soultion can be implemented in my query
Hi @Anonymous ,
You need to drag the measure into the visual you want to slice and set the filter rules.
Attached PBIX file for reference.
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
thanks for your support its working
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.