Forum Discussion
Creating new column / table values based on several conditions
Matt,
Thank you for your reply and a solution. It works as a measure, but as you mentioned in your article it can not be used for filtering with slicers. As you see in the image I get the result, but I can not set a slicer for true- false values.
I must now put this measure into column :). Any idea how to create column from the measured values?
Best regards
Matt
Hi skype_see4d,
What result do you want to get after you select False value in a slicer? If you what to return all Nr. that have FALSE status, then just create a slicer using Status field, then use it to filter your visual.
If you want to return only 90003 that has FALSE status after selecting False value, use the following formula to create the Matts measure, then use Visual Level filter instead of slicer to filter your visual as shown in the following screenshot.
Matts measure = if(lastnonblank(VALUES(Table1[Status]),1)=TRUE,"True","False")
Thanks,
Lydia Zhang
- MattAllington9 years ago
Community Champion
skype_see4d sorry for my slow reply. I like Lidia's approach if that works for you. If you want a slicer, do the following.
1. Create a lookup table of all the ID and Names
2. Join the new table to the existing table
3. Delete the Description from the Existing table (no longer needed).
4. either add the measure as a new calc column (ie = [measures]) or add the following formula
= CALCULATE(if(lastnonblank(VALUES(Data[Nr Description Status.3]),1)="True","True","False"))
Here is a demo
https://www.dropbox.com/s/o7yu7nozm781gxf/returning%20true%20or%20false.xlsx?dl=0