Forum Discussion
Percentages without null values and Dates
- 1 year ago
Hello ponchibonos,
Thanks for sharing those examples.
I have reproduced your scenario in Power BI Desktop and confirmed that the output matches your expected results:For your reference, I’m attaching the .pbix file containing the working example so you can review the setup and DAX logic in detail.
Best Regards,
Ganesh singamshetty.
Hello ponchibonos,
Thank you for reaching out to the Microsoft Fabric Forum Community.
I have reproduced your scenario in Power BI using sample data and created a measure that dynamically calculates the expected percentage based on slicer selection.
Here’s the DAX measure I used:
% Answered (Excluding Nulls) =
VAR _SumAnswered =
SUM('Table'[Percentage result])
VAR _SumExpected =
CALCULATE(
SUM('Table'[Percentage of each Question]),
FILTER(
'Table',
NOT ISBLANK('Table'[Percentage result])
),
REMOVEFILTERS('Table'[Form], 'Table'[Question])
)
RETURN
DIVIDE(_SumAnswered * 100, _SumExpected)
- The numerator only includes actual responses
- The denominator remains fixed and unfiltered by slicers (to calculate true expectations)
For your reference, I’m attaching the .pbix file where you can test and validate the output and thank you, Irwan for sharing valuable insights.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.