Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi guys,
I have a live dataset like this,
Timestamp Value
2020/06/17 1:00 12
2020/06/17 2:00 19
2020/06/17 3:00 1
2020/06/17 4:00 11
2020/06/17 5:00 19
2020/06/17 6:00 8
2020/06/17 7:00 2
2020/06/17 8:00 3
2020/06/17 9:00 4
I want to display this whole data as one line in a plot. And in another line i want to display only the last 5 points in different color. Is there any measure for that?. Or is it possible to show the last 5 points in different color within the same line itself?.
Thanks,
Solved! Go to Solution.
For show last 5 data, you could try this formula:
last 5 data = IF(RANKX(ALL('Table'[Timestamp]),CALCULATE(MAX('Table'[Timestamp])),,DESC)<=5, CALCULATE(SUM('Table'[Value])) )
Regards,
Lin
For show last 5 data, you could try this formula:
last 5 data = IF(RANKX(ALL('Table'[Timestamp]),CALCULATE(MAX('Table'[Timestamp])),,DESC)<=5, CALCULATE(SUM('Table'[Value])) )
Regards,
Lin
@pbidemouser2 , The way to do is create a bar visual and define a rule or based measure color the bars and then change it line plot.
For the last five create a rank on date-time desc Rank, use this rank in conditional formatting
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
Color Field - Color Measure - Conditional formatting
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |