Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
to get the latest sales date write like this
var vMaxDate=LASTNONBLANK(Service[Created_Time],[_Total_Requests]) ---- [_Total_Requests] is the amount of sales
or
var vMaxDate=LASTNONBLANK(Service[Created_Time],[Amount]) ---- [Amount] is the amount of sales
Hi,
Share the download link of the PBI file.
@Ashish_Mathur it's a large file with many tables and measures. I was just hoping that, knowing the above facts/details, that someone could point me in the right direction. Btw, I have been trying to use datesmtd on the dates column in the calendar dimention table, which is related to the service table using a date column. It doesn't work because, for some reason, datesmtd returns the full list of dates of the last month in the calendar dimension table--that's December of 2023. If I use datesmtd on the date column in the service fact table, I get an error stating that that column has duplicate values--well, it is expected to have duplicate values; it's a FACT table.
@yasbos , for MTD , YTD month etc use date table and time intellignece
exmaple
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
this month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
@amitchandak datesmtd causes the code to return an empty set because it seems to return the dates of the last month in my calendar table, instead of the dates from the 1st to the 23rd of March. My calendar table has dates to the end of the year--to December 31, 2023. Datesmtd returns december 1 to 31 2023. If I use the date field from my fact table instead, I then get an error that the date column contains duplicate values! Well, obviously the date column in my fact table will contain multiples of the same date, since there are multiple requests made on the same date 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |