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.
Hi everone,
We are trying a scenario where using DAX measure we are changing the filtered value .Here is the screenshot of the table. Here we are calculating the sum of value column by using col1 and col2. So when we place col1 in the slicer and chose a the filtering should be done on the basis of col2 and sum of valueshould be 30 .
If you need any clarification on this problem, please let us know.Any help would be useful.
Thanks
Solved! Go to Solution.
Hi @singhal14,
According to your description, you want to use slicer to choose the col2 and show sum of the value,right?
If this is a case, you can refer to below steps to achieve your requirement.
Original table:
Calculate table:
Table = VALUES(Table1[col1])
Add a measure to new table to get slicer's value.
Selected = if(HASONEVALUE('Table'[col1]),VALUES('Table'[col1]),BLANK())
Add measure to original table to calculate summary value.
TotalValue =
var temp=LOOKUPVALUE(Table1[col2],Table1[col1],[Selected])
return
SUMX(FILTER(ALL('Table1'),'Table1'[col2]=temp),[value])
Add the relationship between original table and calculate table.
Create visuals.
Slicer:
Table visual:
Result:
Regards,
Xiaoxin Sheng
Hi @singhal14,
According to your description, you want to use slicer to choose the col2 and show sum of the value,right?
If this is a case, you can refer to below steps to achieve your requirement.
Original table:
Calculate table:
Table = VALUES(Table1[col1])
Add a measure to new table to get slicer's value.
Selected = if(HASONEVALUE('Table'[col1]),VALUES('Table'[col1]),BLANK())
Add measure to original table to calculate summary value.
TotalValue =
var temp=LOOKUPVALUE(Table1[col2],Table1[col1],[Selected])
return
SUMX(FILTER(ALL('Table1'),'Table1'[col2]=temp),[value])
Add the relationship between original table and calculate table.
Create visuals.
Slicer:
Table visual:
Result:
Regards,
Xiaoxin Sheng
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 | |
96 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |