March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Sorry, couldn't find this by searching but I was curious, I have created several measures to caculate Month to Date numbers as well as Previous year MTD.
MTD Days Open = TOTALMTD(COUNT(vwBusinessSummary[FromDate]),'vwBusinessSummary'[FromDate])
PYMTD DAYS OPEN = CALCULATE([MTD Days Open],DATEADD(DATESMTD(AllDates[TheDate]),-1,YEAR))
attached is a screen shot of my data, as you can see the MTD is summing but the PYMTD is not. Any suggestions?
Without seeing your data, or a sample of it, and replicating the issue, my guess would be that something is making the measure formula essentially invalid in the "ALL" context, which is essentially what the total line represents.
See attached for the data.
Additional Information, this is the dates open for our stores, Monday through Saturday (no Sunday), I am wondering if not having continuous days an issue, though it works for the MTD.
How are the 2 tables related?
What do you get with this formula?
PYMTD DAYS OPEN = CALCULATE ( COUNT ( vwBusinessSummary[FromDate] ), DATEADD ( DATESMTD ( AllDates[TheDate] ), -1, YEAR ) )
DATEADD does require a contiguous date column - but it seems you already have a date table (AllDates)
You can also try
PYMTD DAYS OPEN 2 = CALCULATE ( COUNT ( vwBusinessSummary[FromDate] ), SAMEPERIODLASTYEAR ( AllDates[TheDate] ) )
First Formula gives me same results but no sum for the column, second give me the error rearding contiguous dates.
Relationship (see attached).
thanks for all your assistance.
Hi @gator99,
Please use the date table in both formulas, and check if it works.
MTD Days Open = TOTALMTD(COUNT(vwBusinessSummary[FromDate]),AllDates[TheDate]) PYMTD DAYS OPEN = CALCULATE([MTD Days Open],DATEADD(DATESMTD(AllDates[TheDate]),-1,YEAR))
If you have other issues, please let me know.
Best Regards,
Angelia
When I changed the MTD Days Open to what you suggested I loose the summation on the MTD Days Open colum as well.
Hi @gator99,
Do you have resolve your issue? If it does, I am very gald to hear you have resolve your issue, please mark the corresponding reply as answer if it's helpful, so other people will find solution easily. If it doesn't, please feel free to ask.
Best Regards,
Angelia
Hi @gator99,
While talking about this problem with @RobJo and @edejes2 we came to the conclusion that we won't be able to fully help you unless you can share the pbix file (obviously with dummy data) or dummy data itself in XLSX or CSV format for example.
The new official Microsoft Power BI User Group board has a nice place to share files, or if you prefer, you can upload to any other place of your choice.
We discussed this issue in the "Global Power BI - Forum Aid" event.
Come join us at the new pbiusergroup.com board for more info & help
EDIT ***DELETED LAST POST****
So I think I have what you need, please find attached a zip file with the pbix and two excel files that builds my report.
Just thought I would reach out again to see if what I shared was accessible? Also to see if anyone had any suggestions. Thanks again.
Sorry to bring this back up but I still have had no luck trying to figure out why one column sums and the other does not. Any other thoughts?
Thank you so much for any help.
JBG
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |