Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I wish to understand this measure, especially the part in AND():
@Yamabushi Please find the summary
MAX(DimDate[FullDateAlternateKey]): This part finds the maximum (latest) date in the DimDate table.
MAX(DimDate[FullDateAlternateKey]) - 2: Subtracting 2 days from the latest date gives you a date that is 2 days ago.
DimDate[FullDateAlternateKey] > MAX(DimDate[FullDateAlternateKey]) - 2: This condition filters dates that are greater than 2 days ago.
DimDate[FullDateAlternateKey] <= MAX(DimDate[FullDateAlternateKey]): This condition filters dates up to the latest date.
AND(...): The AND function combines the two conditions, ensuring that the date is within the last 2 days.
CALCULATE([Total Sales], ...): Finally, the CALCULATE function applies these date filters to the [Total Sales] measure, giving you the total sales for the last 2 days
And accept as solutin if it helps
Proud to be a Super User! |
|
Hi,
thank you, @bhanu, but that was not what I was asking. I understand what each function individually does. My question specifically relates to evaluation context:
Thanks!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |