Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
In the picture below, you can see the measure that wrote for Consent rate Last Week. In the matrix below, I have year, months and week number in the row part and then columns. The consent rate is simply the divide function between the other two columns. I put the consent rate measure I created into a measure to get last weeks numbers and they are not matching up. I cannot seem to figure out how these numbers are off.
Solved! Go to Solution.
@dbrandone I did invent a DAX week number column that does not reset at the end of the year called Sequential: Sequential - Microsoft Power BI Community
@dbrandone
Please the following measure:
VAR __WEEK = WEEKNUM ( TODAY () , 2)-1
RETURN
CALCULATE (
[Consent Rate],
'Date'[Week of Year] = __WEEK
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@dbrandone This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
What is also odd is that I wrote a measure for last month and the number was right.
Thanks @Greg_Deckler ,
I went into the table view and manually filtered the data based on the filters in the measures for the totals measures that led to the consent rate. I did the math and they line up perfectly with the table. The table is correct, but the card measure is not.
@dbrandone What is result you want in your card visual?
@dbrandone OK, I can think of a few things. One, check what filters are active on your matrix visual and card visual. Are they the same? Two, try hard-coding the week to 35 and see if you get the right answer. Three, do you have any prior or future years that it could be pulling week 35 from? Fourth, is there a data issue where week 35 is also in some other month
The filters for both the matrix and the card were set to "ALL" so there were no impediments there. Obviously, the matrix had more filters in the visual with the more components it had vs. the card, but there were no visual filters causing an issue.
Interesting though, when I hard code week 35 and year 2021 into each variable, the card percentage comes out right. The weird thing about it is that I went back to all the years in the matrix with week 35 and did a manual calculation and it still does equal the 60.38%. That is of course if it is pulling the data from all week 35's in all years. So it seems that it is something with the Week number column in the date table? Is it beneficial to have a week number column in the date table that goes up, but doesn't reset at the beginning of the year?
I ended up trying this and it seemed to have worked and should keep steady this way, but I am still interested in the reason my Week number column isn't functioning properly or if there is an issue with one of my tables.
@dbrandone I did invent a DAX week number column that does not reset at the end of the year called Sequential: Sequential - Microsoft Power BI Community
Thanks!! I already created a new column off of your column code and it is functioning well.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
121 | |
112 | |
59 | |
58 |