Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello Experts,
I have data set consists of Unqiue date column (365 different values) ,Output1 , Output2 and Output3.
I have added a visual to display the last value in Output1 with the measure
MEASURE = LASTNONBLANK(Table1[Output1],Table1[Output1])
This measure always returns with the highest value so I figured out that the column is sorted based on itself but when I tried to change the sorting of the "Output1" column by "Date" Column, it gives me the error:
Any help is much appreciated.
Solved! Go to Solution.
Hi @RamiGamal ,
If you want to get the last value instead of the highest value, please try following measure:
Measure = LASTNONBLANK('Table1'[Value],CALCULATE(MAX('Table1'[Date]),'Table1'[Date] = MAX('Table1'[Date])))
I think this is the result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RamiGamal
As the error said, there can't be more than one value in 'Date' for the same value in 'RIR',
so the reason why you can't sort "Output1" column by "Date" Column is most probably that "Output1" column has duplicate values.
For example, I have a test table 1 which has unique values, [Value] column can sort by [Date] column:
The test table 2 which has duplicate values, [Value] column can not sort by [Date] column:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply, this is well understood, but what is the best solution for this , cause also in your example If I try to get the last value it will give me the highest
Hi @RamiGamal ,
If you want to get the last value instead of the highest value, please try following measure:
Measure = LASTNONBLANK('Table1'[Value],CALCULATE(MAX('Table1'[Date]),'Table1'[Date] = MAX('Table1'[Date])))
I think this is the result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@RamiGamal , Both Date and RIR show have the same granularity
How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
91 | |
89 | |
79 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |