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 all how do i assign a dynamic slicer value on a calculated column. Please see the attached.
I cant create a measure for this. Kinldy help. I just need to display 1 for the selected value from slicer.
Solved! Go to Solution.
Hi @harshagraj ,
As you are using a calculated column, we cannot use the selected value from segment code slicer in the DAX for calculated column as calculated columns work on row by row calculation and tend to give static values in each row of the table.
You might need to create a measure for dynamic filtering of the segment code in the DAX.
Thanks!
Avantika
Hi @harshagraj ,
There is one way that we can handle this.
1) Create a separate lookup for the segment codes that you will be using in the Slicer.
Ex: I have used alphabets A-D as examples for segment codes
2) And you will have a separate column for segment codes in Fact table as below
3) Create a relationship between these two tables as below on the segment codes columns in respective tables
4) And then you can create a measure like :
Hi @harshagraj ,
As you are using a calculated column, we cannot use the selected value from segment code slicer in the DAX for calculated column as calculated columns work on row by row calculation and tend to give static values in each row of the table.
You might need to create a measure for dynamic filtering of the segment code in the DAX.
Thanks!
Avantika
Hi @Avantika-Thakur thanks for the reply but the problem is cant able to create a measure for this too.I cant aggregate Segment code column.
IF(_??__(SegmentCode) =Selectedvalue(Segmentcode),1,0)
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |