Forum Discussion
Conditional formatting help
- 3 years ago
Hi, sarath_chandra
You can try the following methods.
Measure:
Current value = SUM('Table'[usage value])+0Previous value = CALCULATE([Current value],FILTER(ALL('Table'),[Weeknum]=SELECTEDVALUE('Table'[Weeknum])-1&&[PN]=SELECTEDVALUE('Table'[PN])))Diff = [Current value]-[Previous value]Color = IF([Diff]=0,"Yellow",IF([Diff]>0,"Green","Red"))Is this the result you expect? The last question is what kind of output you expect it to be, and can you show it in pictures.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
| Date | PN | usage value |
| 05/01/2018 | 7ui45 | 2 |
| 12/01/2018 | 8u89 | 118 |
| 23/01/2018 | 8u89 | 162 |
| 02/02/2018 | 4567 | 7 |
| 09/02/2018 | 4567 | 10 |
| 02/02/2018 | 8u89 | 82 |
| 09/02/2018 | 8u89 | 106 |
| 23/01/2018 | 7ui45 | 6 |
| 02/02/2018 | 7869 | 4 |
| 09/02/2018 | 7869 | 4 |
| 05/01/2018 | 8790 | 13 |
| 12/01/2018 | 8790 | 31 |
| 23/01/2018 | 8790 | 73 |
| 02/02/2018 | 8790 | 18 |
sarath_chandra ok, let's start from point 2, the blank values.
You have to create a table starting from the native, making a distinct on the Date field, then create a relationship between the two tables and use the Date field of the new table in the matrix. At this point in "values" put a new measure that makes the sum of the usage field +0.
I am attaching a pbix with this point done with example data. Let me know if you have any questions, in the meantime I'll sort out the remaining points.
BBF