Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
This is my first time posting on here. I have multiple columns with multiple values and I want to use the column headers into the filter by summing up values in partiular column. For example: I want sum of all the values of column freightcharge and use the header freight charge in the filter, then sum all the values in fuel surcharge and use the header in the filter and so on. Any help would be appreciated. Thank you in advance!
Solved! Go to Solution.
Hi @Anonymous ,
Step1: Create multiple measure according to the column name. For example:
measureA = calculate(sum([column1]),all(table))
measureB = calculate(sum([column2]),all(table))
measureC = calculate(sum([column3]),all(table))
...etc.
Step2: Create a table contains a column with values like AA, BB and CC ...etc and use this table as slicer.
Step3: Create a measure like below.
mesaure = Switch(selectedvalue([slicer]),"AA",[measureA],"BB",[measureB],"CC",[measureC]...etc)
Best Regards,
Jay
Thank you so much y'all! It worked 😀
Hi @Anonymous ,
Step1: Create multiple measure according to the column name. For example:
measureA = calculate(sum([column1]),all(table))
measureB = calculate(sum([column2]),all(table))
measureC = calculate(sum([column3]),all(table))
...etc.
Step2: Create a table contains a column with values like AA, BB and CC ...etc and use this table as slicer.
Step3: Create a measure like below.
mesaure = Switch(selectedvalue([slicer]),"AA",[measureA],"BB",[measureB],"CC",[measureC]...etc)
Best Regards,
Jay
Hello, thank you for your reply. Is there any way to pull data directly from the source into the table that I create? Or do i have to put the sum of all the columns manually into the table that i created to use into a filter/slicer?
@Anonymous you can't use measures in slicers.
But there is a workaround. You can create a disconnected slicer table and use a DAX SWITCH statement to have the preferred measure returned.
Pbix is attached
Thank you so much! Can you please guide me stepwise on how to achieve this?
@Anonymous follow the attached pbix
Hi All,
It is working but it has a problem. It is fine until i select one field in the slicer but i start selecting multiple fields, the card shows me blank.
@smpa01 @v-jayw-msft @StefanoGrimaldi
.
@Anonymous i am extremely busy this week, can look and reply early next week
Hello 🙂 Any updates on this?
hey,
this have little details I recommed you to read the post at the top of the forum about getting your questions aswered quickly, now isnt clear what you want to achieve and how you using the header as filter? cause for what you said you just need to use sum(...) for each column and sum each one up and that it,
Proud to be a Super User!
Suppose:
I have column A with values 5,10,15,20, column B with values 25,30,35,40, column C with values 45,50,55,60.
I want to add 5,10,15,20 in column A, then add 25,30,35,40 in column B and then add 45,50,55,60 from in C.
I added values 5,10,15,20 in A and created a new measure AA with total value 50, then added values in B 25,30,35,40 and created a new measure BB with total value 130, and then then added values in C and created another measure CC with total value 210.
Now I want to create a filter/slicer where i can filter values from AA,BB and CC.
Power BI is not letting me add the new measure in the slicer that i created.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |