The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
helpI have a table with the following structure:
Category | Colour | Date | Value | |
Dog | Brown | 01/01/2023 | 1 | |
Dog | Black | 02/01/2023 | 0 | |
Dog | Yellow | 03/01/2023 | 0 | Sum this |
Cat | White | 04/01/2023 | 1 | |
Cat | Black | 05/01/2023 | 1 | |
Cat | Ginger | 06/01/2023 | 0 | Sum this |
Mouse | White | 07/01/2023 | 1 | |
Mouse | Grey | 08/01/2023 | 0 | |
Mouse | Black | 09/01/2023 | 1 | Sum this |
I'm trying to write a measure that sums the value column for the latest record of each Category. In this example the result would be 1. After much googling and chatgpt, I'm still stuck! Any help would be appreciated!
I also have a filter on the table visual that filters the date column, and I have a slicer that that slices the Colour column.
Solved! Go to Solution.
Hi @russell80
Please try
ResultMeasure =
SUMX (
SUMMARIZE (
'Table',
'Table'[Category],
"@Value", SUMX ( TOPN ( 1, 'Table', 'Table'[Date] ), 'Table'[Value] )
),
[@Value]
)
Hi @russell80
Please try
ResultMeasure =
SUMX (
SUMMARIZE (
'Table',
'Table'[Category],
"@Value", SUMX ( TOPN ( 1, 'Table', 'Table'[Date] ), 'Table'[Value] )
),
[@Value]
)
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |