Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
How would I set up MTD and YTD calculations such that I can specify which month to use for MTD and YTD? I am trying to set up reports, but would like to run any month at will (ie. June month and YTD). My date table has the entire year of 2016.
Thanks in advance!
Solved! Go to Solution.
I'd be glad to.
Long story short (or short story long), I'm developing my model while still incorporating and loading my data. I had not loaded all of my November and December data for 2016, so no MTD data was displayed. USER ERROR!!!
To solve:
1) I created a dates table with a row for every day in the time period needed.
2) Created MTD metric: Prod_Days_MTD = TOTALMTD(SUM(Vessel_Days[Prod_Days]),'Dates'[DateKey])
3) Created YTD metric: Prod_Days_YTD = CALCULATE (SUM([Prod_Days]),FILTER ( ALL ('Dates'), 'Dates'[FullYear] = MAX ( 'Dates'[FullYear]) && 'Dates'[DateKey] <= MAX ( 'Dates'[DateKey])))
Having a blast!!! Now working to create meaningful visuals.... 🙂
MAC
I got it!!
Hi @MAC,
Glad to hear that your issue got solved. Could you share us the solution for it, it will help others who have similar issue to find the solution easily.
Regards,
Charlie Liao
I'd be glad to.
Long story short (or short story long), I'm developing my model while still incorporating and loading my data. I had not loaded all of my November and December data for 2016, so no MTD data was displayed. USER ERROR!!!
To solve:
1) I created a dates table with a row for every day in the time period needed.
2) Created MTD metric: Prod_Days_MTD = TOTALMTD(SUM(Vessel_Days[Prod_Days]),'Dates'[DateKey])
3) Created YTD metric: Prod_Days_YTD = CALCULATE (SUM([Prod_Days]),FILTER ( ALL ('Dates'), 'Dates'[FullYear] = MAX ( 'Dates'[FullYear]) && 'Dates'[DateKey] <= MAX ( 'Dates'[DateKey])))
Having a blast!!! Now working to create meaningful visuals.... 🙂
MAC
User | Count |
---|---|
84 | |
75 | |
73 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
52 | |
43 | |
42 |