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.
Consider the below table
id | date | budget |
101 | 01/06/2020 | 50 |
101 | 01/07/2020 | 100 |
103 | 01/06/2020 | 50 |
103 | 01/07/2020 | 50 |
103 | 01/08/2020 | 20 |
I'm looking to create a measures
Desired output is a table as below
last date | budget | |
101 | 01/07/2020 | 100 |
103 | 01/08/2020 | 20 |
Thank you in advance
Solved! Go to Solution.
Hi @giordafrancis ,
You can use this for Last Date
Last Date = CALCULATE(LASTNONBLANK('Table'[date],1) ,FILTER(ALL('Table'[id]), 'Table'[id] = MAX('Table'[id])))
and the above mentioned measure for Last Budget.
Last Budget =
lastnonblankvalue('Table'[date],sum('Table'[budget]))
Regards,
Harsh Nathani
Hi @giordafrancis ,
You can use this for Last Date
Last Date = CALCULATE(LASTNONBLANK('Table'[date],1) ,FILTER(ALL('Table'[id]), 'Table'[id] = MAX('Table'[id])))
and the above mentioned measure for Last Budget.
Last Budget =
lastnonblankvalue('Table'[date],sum('Table'[budget]))
Regards,
Harsh Nathani
@giordafrancis , use this for budget
lastnonblankvalue(Table[date],max(Table[budget]))
or
lastnonblankvalue(Table[date],sum(Table[budget]))
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |