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 moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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.
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
88 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |