The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
FY-Quarters | Quantity | Quarters FY | FY | Last date of the quarter |
Q2-2022 | 54 | 2 | FY22 | 30/09/2021 |
Q3-2022 | 76 | 3 | FY22 | 31/12/2021 |
Q4-2022 | 8 | 4 | FY22 | 31/03/2022 |
Q1-2023 | 1 | FY23 | 30/06/2022 | |
Q2-2023 | 2 | FY23 | 30/09/2022 | |
Q3-2023 | 3 | FY23 | 31/12/2022 | |
Q4-2023 | 4 | FY23 | 28/02/2023 |
I want to get the last date of the quarter where the last value of Quantity is falling in. For example, in my sample data above, I need to get 31/03/2022.
Note:
Quantity is a measure:
Quantity = SUMX(TABLE,TABLE[demand])
FY Quarters, Quarters FY, FY and Last date of the quarter columns are coming from a Date table.
How can I do this please?
Solved! Go to Solution.
Hi,
I tried to create a sample data like below.
Please check the below picture and the attached pbix file.
Last value last date of quarter: =
VAR lastvalue =
LASTNONBLANK ( 'Calendar'[Date], [Quantity:] )
RETURN
CALCULATE ( MAX ( 'Calendar'[End of Quarter] ), 'Calendar'[Date] = lastvalue )
Hi,
I tried to create a sample data like below.
Please check the below picture and the attached pbix file.
Last value last date of quarter: =
VAR lastvalue =
LASTNONBLANK ( 'Calendar'[Date], [Quantity:] )
RETURN
CALCULATE ( MAX ( 'Calendar'[End of Quarter] ), 'Calendar'[Date] = lastvalue )
@Anonymous , Try like
calculate(lastnonblankvalues(Date[Date], sum(Table[Demand])), filter(allselected(Table), Table[Qtr year] =max(Table[Qtr year])) )
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |