Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hello, I'm having an issue calculating a total. Here is what I'm trying to do. In the end I'm trying to calculate the total for the prior day. If the prior day happens to fall on Sunday, then take the day before that. I haven't even got that far. First I was trying to get accurate results for the prior day. Since today is 8/3/2020, prior day date is 8/2/2020. However, you will see in my screenshot below I'm getting odd results. I have scripted out the measures used and what I'm getting in a matrix. Can someone explain what is happening here? For both these measure I'm expecting to see 8/2/2020 in the row for the date and blank for the total since I only have 46 records back on the 31st of July. Also, how would I create my measure to account for going back an additional day if the previous day is Sunday?
Thanks in advance!
@Anonymous , You can create Rank like given in this one. Change the formula to have only Sunday as holiday
To find previous day with Rank is same as finding last week using Rank
Hi @Anonymous ,
Please give these two sample tables and I will create the DAX formula for you.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous change your main measure to this:
No Response = CALCULATE ( SUM ( 'Table'[Total] ), 'Table'[Y/N] = "No Response" )
and also make sure your _calendar table is marked as a date table.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
83 | |
69 | |
68 | |
57 | |
50 |
User | Count |
---|---|
42 | |
41 | |
33 | |
32 | |
31 |