Forum Discussion
Conditional Formatting Slicer
- 9 years ago
Firstly, you should pivot your months into one column:
Then create a calculated column to assign value (1 or 0) when achieving target or not.
Tag = var CurrentTarget = LOOKUPVALUE('KPI'[Value],'KPI'[KPI Name],'KPI'[KPI Name],'KPI'[Year],'KPI'[Year],'KPI'[Month],'KPI'[Month],'KPI'[ACT/TARGET],"TARGET") return SWITCH('KPI'[Green],"Lower",IF('KPI'[Value]<CurrentTarget,1,0),"Higher",IF('KPI'[Value]>CurrentTarget,1,0))Now you can create a matrix and apply conditional formatting on Tag column.
You can apply a slicer on Tag column to filter Red or Green.
Regards,
Hi v-sihou-msft,
Could you also help me on the below issue i have faced, actually i have 13 columns (12months and 1 comment).
So when i unpivot all columns (13) it was done because i dont have any values in comment column (Only Null). Now when i try to include some text and try the same, it pops the below error
Final stage i'm struck.
Many Thanks
I haven't gone through the entire thread, but...do you need to unpivot the Comment column? Could you just unpivot the months only?
- Thiyagu9 years agoHelper III
Hi MalS,
Actually i want to show the data in matrix visual, please check the above images. I did unpivot all months with comment column as well and it works because that time comment column had null values. after i put some testing data and refresh it i faced the datatype conversion error.. So i need to show the comment part after all months like below.
Jan Feb Mar.... Dec.. Comments
Hope you understand my requirement. if you want i ll give further explanation.
Thanks,
THiyaga
- MalS9 years agoResolver III
Yes, but you could just unpivot the months (not the Comment column).
Then when you create the matrix, you can add the Comment field to the rows section of the matrix.
- MalS9 years agoResolver III
Alternatively, you could unpivot the Comments column with the months, then make sure the resulting Values column had a data type of Text. Then, instead of summarizing the Value field using sum, min , max (or whatever you used originally), you should be able to summarize it using 'First' (which will work on a text field).