Forum Discussion
Create A button based on the measure result
- 3 years ago
thanks v-yueyunzh-msft for sharing you valuable feedbacks.
for few the cases the solution is working fine but few of them it is not working.
if we are using matrix chart with number month is there in the column feild then it is not working.
Hi , sanc_152
According to your description, you want to "Create A button based on the measure result".
Here are the steps you can refer to :
(1)This is my test data:
I create a measure to similuate your measure to return text :
Measure = IF( SUM('Table'[Value])>3 , "Winner" , "Loser")
(2)Due to the measure can not put it into the slicer visual , we need to click "New Table" to create a table which has one column as a slicer's field.And we do not need to create any relationship between two tables.
Table 2 = {"Winner","Loser"}
(3)We can create another measure as a filter :
Measure 2 = var _slicer = VALUES('Table 2'[Value])
return
IF([Measure] in _slicer ,1,-1)
Then we can put this measure on the "Filter on this visual" and configure it and then we can meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
thanks v-yueyunzh-msft for sharing you valuable feedbacks.
for few the cases the solution is working fine but few of them it is not working.
if we are using matrix chart with number month is there in the column feild then it is not working.
- v-yueyunzh-msft3 years ago
Community Support
Hi , sanc_152
Sorry for that i may can not understand the situation like yous. Can you explain the "if we are using matrix chart with number month is there in the column feild then it is not working"?
The only way to use measure results as slicers is to create a dimension table and write the measure again to filter the values displayed. There is no way I can replicate your situation, nor do I have your test environment.
Can you provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- sanc_1523 years ago
Helper I
Thanks For your efforts. I think in matrix chart we cannot perform that.
Still you can tryviewpoint in matrix should be the above one .winner is measure which dynamically generating result in string format based on the S and D feilds comparision.
Query
need one slicer to filter out the values (S & D should be the vlaues avaialble in slicer).
when user select S from the slicer the result should be evalusted for S as winner