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.
Hello, I am trying to control 1 Visual with 2 slicers. The first one controls the companies(x axis) that appear on the Stacked Column Chart. The second controls objects that are in the stacks(y axis). Got the first slicer working fine so I can control what companies appear in the chart but the second one always seems to just return true when I check if it's returning.
Table = ADDCOLUMNS(SumOfErrors,"NICKTEST",CALCULATE ( SUMX(SumOfErrors, IF(CONTAINS (ALLSELECTED(Errors[ErrorType]),Errors[ErrorType],"OT"),(VALUE([P_OT])),0) +//Adds the next term to run through SUMX IF(CONTAINS (ALLSELECTED (Errors[ErrorType]) ,Errors[ErrorType],"UT") ,(VALUE([P_UT])),0) ), FILTER(ALLSELECTED(SumOfErrors[VENDOR_NAME]), SumOfErrors[P_UT] IN VALUES(SumOfErrors[P_UT]))))
The Errors Table is just 1 column with a bunch of rows that contain error codes such as "OT". This is what provides options to the second slicer.
What I was trying to do was
1. Grab the list selected rows from Slicer 2.
2. Run that through an SUMX with a bunch of if statements to see if it contained an error code.(1 code at a time)
3. Use that to populate my graphs.
If anyone has a clue what I have done wrong it would be much appreciated.
Solved! Go to Solution.
Hi,
In edit queries select UT, OT, BT and CT and click unpivot columns. You now get Attribute and Value. Then create a relationship between Attribute and Errortype and the slicers should work.
Screenshots below
And here is the pbi file.
https://1drv.ms/u/s!AgnVgd15_ye0hBnpo-dpJlRKyYpc
Hope this helps, Goodluck.
Hi @Anonymous ,
I am not sure what desired result would you want, could you please share your sample data or desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Best Regards,
Amy
Hey @v-xicai
So the Table SumOfErrors Looks something like this:
This is the Errors table I am trying to use a slicer:
And using this data I am trying to build visuals in Power Bi but I would like to be able to choose the vendors being show and select the Error type shown. For example I would like to select company1 and 3 but only show errors UT and CT. My problem is that I am unsure how I would select column using a slicer.
Let me know if this makes things anymore clear.
Thanks
Fixed picture, will look into request now.
Hi,
In edit queries select UT, OT, BT and CT and click unpivot columns. You now get Attribute and Value. Then create a relationship between Attribute and Errortype and the slicers should work.
Screenshots below
And here is the pbi file.
https://1drv.ms/u/s!AgnVgd15_ye0hBnpo-dpJlRKyYpc
Hope this helps, Goodluck.
@Anonymous
You are a champion sir, I spent hours trying to do it my way but this works much better.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |