Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I'm working with a dataset that, put simply, tracks people who fall, and I also have another one that tracks many thing including time of stay. They're something like this (I'll include the .pbix file at the bottom of this thread):
With this data, I have to make a measure with the following formula:
FallsFormula = COUNT(Falls[Episode])/SUM(Population[2022])*1000
Now, when I put this over a card visual, the math is right, yearly, the formula's result is 0.52. However, when I put this formula in a line graph and put Incident Date over the X axis, I get numbers that are much lower than I'm actually expecting.
But what is actually happening is:
1/11559*1000 = 0.087
So the first operand is getting filtered correctly by the month I'm asking for, probably because it's the database that contains the date, but for the second operand that is not the case (And just to clarify, I AM converting the JANUARY, FEBRUARY, etc... parts into a date format [2022/1/1, 2022/2/1, etc...]). Is there a way to make this formula do what I need?
Extra info:
Thank y'all for your time.
Then create a column in both tables: YearMonth
For falls:
YearMonth = YEAR(IncidentDate) * 100 + MONTH(IncidentDate)
For population
I dont understand this table, but you can do it
Then you can put a relation between the 2 tables and off you go
Then create a relation betweeb
I dont see any error
Your data:
1 in Jan, 1 in feb, 1 in sept, 1 in nov and 2 in dec
Your population is 11559 in 2022
So your numbers should be 0.087, 0.087, 0.087, 0.087, 0.174 together that makes 0.522
Now if the issue is that you dont see any numbers for March april etc.
Change your formula to:
I understand the formula may not have any technical errors, however, what I'm looking for is a formula that filters per month, because I don't need to use the full year population on the second operand, but rather the population corresponding to the month I'm going to show on my graph.
Hi MonkeyWrench,
I think you can create a Date table,
See if it works on you senarios.
Regards
Tony
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
86 | |
79 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |