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.
I have a basic LOD formula in Tableau that I need to re-write it in Power BI.
My Tableau LOD Formula :
# of Enrollments: { INCLUDE [Course Unique ID]: AVG([Enrollments])}
In Power BI I have tried multiple DAX formula and I am not getting the write number of Enrollments
Solved! Go to Solution.
Hi @fereshtehaghaei ,
Based on your problems, here are my answers.
For your DAX code I think you can make changes to it. You use the CALCULATE function to modify the context of the calculation. Inside CALCULATE, you can calculate the average of the enrollments column from the responseRates table using AVERAGE(responseRates[enrollments]).
The ALLEXCEPT function removes all filters except for the courseUniqueID column from the ResponseRate +Courses table. This ensures that the calculation is performed at the desired level of granularity.
# of Enrollments =
CALCULATE(
AVERAGE(responseRates[enrollments]),
ALLEXCEPT('ResponseRate +Courses', 'ResponseRate +Courses'[courseUniqueID])
)
This is just my speculation on your code, if you can provide me with specific data or more information, I can answer for you.
How to Get Your Question Answered Quickly
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @fereshtehaghaei ,
Based on your problems, here are my answers.
For your DAX code I think you can make changes to it. You use the CALCULATE function to modify the context of the calculation. Inside CALCULATE, you can calculate the average of the enrollments column from the responseRates table using AVERAGE(responseRates[enrollments]).
The ALLEXCEPT function removes all filters except for the courseUniqueID column from the ResponseRate +Courses table. This ensures that the calculation is performed at the desired level of granularity.
# of Enrollments =
CALCULATE(
AVERAGE(responseRates[enrollments]),
ALLEXCEPT('ResponseRate +Courses', 'ResponseRate +Courses'[courseUniqueID])
)
This is just my speculation on your code, if you can provide me with specific data or more information, I can answer for you.
How to Get Your Question Answered Quickly
Best Regards
Yilong Zhou
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 |
---|---|
105 | |
96 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |