Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everyone,
I am working on creating a table that can show the average number of requested talent for a certain skill. I currently have a table as shown below:
The middle column in the 'Average Requested Number of Talent per Month' over a period of 4 months. As you can see from the table, most of the values are calculated correctly, for exmaple, PYTHON has 30 Talent requested and the average is (30/4) 7.5. However, when we got lower into MS WINDOWS AZURE it has 22 Talent requested and the average comes to 11. I'm not sure why this is the case.
I created this measure through a quick measure and this is the DAX that it returned:
Could someone help me in figuring out why this is giving me correct values in some cases and not others, and how I can go about getting the correct values?
Solved! Go to Solution.
Hi @VSepaha ,
Sorry for the late reply.
Create a measure like this:
Measure = CALCULATE(AVERAGE('Table'[value]),ALLSELECTED('Table'))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ VSepaha,
It would be great if you provide us some sample data and your desired output..Providing only a screenshot is very difficult to assume your exact requirement..
if i understand correctly,your last two skill name are returning wrong average.So for that
The calculation you sent me does work correctly, however, I have a filter on the page which specifies the last X number of months. By default the number of months is set to 4. In that case,
"Avg Requested Number of Talent per Month = DIVIDE(SUM('Table'[Requested Number of Talent]),4)"
would work correctly. But if I changed the filter to the past 5 months, this formula would be invalid. Is there a way of how I can get the number of months being used by the filter?
Then use the Selectedvalue function for that..
Avg Requested Number of Talent per Month = DIVIDE(SUM('Table'[Requested Number of Talent]),
Regards,
sanalytics
I'm still fairly new to Power BI, I'm not sure what goes in the Alternateresult value.
Would something like this work after I figure out the Alternateresult?
Thanks again for the help!
Hi @VSepaha ,
Try:
Avg Requested Number of Talent per Month = DIVIDE(SUM('Table'[REQUESTED_NUMBER_OF_TALENT]),
DISTINCTCOUNT('Table'[Date].[Month])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This solution didn't seem to work for me. After applying this solution, it divided my 'Requested Number of Talent' by 12 instead of the number of months that I am filtering by.
Could you please help me find a solution that takes the filter into account?
Thank you!
Hi @VSepaha ,
Sorry for the late reply.
Create a measure like this:
Measure = CALCULATE(AVERAGE('Table'[value]),ALLSELECTED('Table'))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |