Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
(I have updated this post from original.)
I am sharing my Pbix file here.
I am trying to create a slicer that selects visual presentation based on three measures or calculation of four columns.
Option for slicer:
OT = sum of [ot_hrs1] & [ot_hrs2]
DT = sum of [dt_hrs1] & [dt_hrs2]
Total = sum of OT & DT
I have four columns as shown below:
I went ahead and created three measures based on these four columns.
Top line graph is based on using three measures, and bottom one is using newly created three columns:
But, I think in order to use values for slicer, it has to be in column, not measure (right?).
Please let me know.
Thanks for help.
Solved! Go to Solution.
@v-yetao1-msft Thank you for your help.
I reviewed the two links you mentioned, and I am still struggling with how I should a link a slicer table with the measure.
I opend up a new post with updated Pbix file.
Hi @JustinDoh1
I found two similar cases, you can refer to their operations .
https://community.powerbi.com/t5/Desktop/how-to-get-the-column-name-in-slicer/td-p/817982
https://community.powerbi.com/t5/Desktop/Slicer-by-columns-name/td-p/228370
If you can, I still recommend that you operate in Power Query with Unpivot , which is a bit simpler than in DAX .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yetao1-msft Thank you for your help.
I reviewed the two links you mentioned, and I am still struggling with how I should a link a slicer table with the measure.
I opend up a new post with updated Pbix file.
@JustinDoh1 If you unpivot your 4 columns in Power Query the solution becomes trivial. Is that a possibility?
Sorry. it has to be done in PowerBI, not in Excel (Power Query).
I also updated the original post with updated PBIX file here.
Actually, the requirement has been changed since the original post that I need to express in three options:
1. ot_hrs1 + ot_hrs2 = OT
2. dt_hrs1 + dt_hrs2 = DT
3. All four
I have updated the original post with more detailed (using Measures vs. Columns).
What is solution here? Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |