Forum Discussion
Using Cards to show latest data without aggregation
I am using a dashboard to track latest data from "Sales" column. This "Sales" column is a measure of Whole number data type. Whenever i am trying to use it as a card it shows aggregation. I just want to show the latest information without any aggregation just like any text column.
I have tried creating a new measure which duplicates the "Sales" column using "FIXED" to convert it into text. But, using it in a card dosent allow me to choose "First" or "Last" values.
| Date | Sales (Measure : Whole number) | Sales (Text) |
| 2/1/2022 | 0 | 0 |
| 2/2/2022 | 100 | 100 |
| 2/3/2022 | 0 | 0 |
| 2/4/2022 | 100 | 100 |
| 2/5/2022 | 100 | 100 |
ank47
Incorporate this into your measure:TakeTheLatestAmount = var LatestDate = MAX(MEasure_First[Date]) var LatestValue = MAXX(FILTER(MEasure_First, MEasure_First[Date] = LatestDate), MEasure_First[Sales (Measure : Whole number)]) return LatestValue
4 Replies
- vojtechsimaSuper User
Hi, ank47
I am a bit confused with your words usage.
So you mean that you created a Calculated Column that returns a numeric value and you want to show the latest?
If that is true, you can just filter the latest date (if you have Date column in your table) in Filter Pane of that visualization or you can write a measure that takes the latest date and take the value from that New Column (you created) and then you just display the Measure. - Ashish_MathurSuper User
Hi,
Do you have a Date column? Share the download link of your PBI file for more help.
- vojtechsimaSuper User
ank47
Incorporate this into your measure:TakeTheLatestAmount = var LatestDate = MAX(MEasure_First[Date]) var LatestValue = MAXX(FILTER(MEasure_First, MEasure_First[Date] = LatestDate), MEasure_First[Sales (Measure : Whole number)]) return LatestValue - v-zhangtiCommunity Support
Hi, ank47
Maybe you can just use measure to come up with the latest values.
Measure:
Latest = CALCULATE([Sales(Text)],FILTER(ALL('Table'),[Date]=MAX('Table'[Date])))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.