Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
For example, if the viewer selects two values in the slicer (record1 and record2) and Monday and Tuesday has no data, I want the calculation to be 0% + 100% / 9 * 2. However, the calculation is calculated as 100% / 9 * 1.
Sorry if the solution is posted elsewhere but I have tried looking for one.
It seems like you want to calculate a percentage based on the number of selected values in a slicer, and you want to include days with no data in the calculation. To achieve this, you can modify your DAX measure to consider all the days, even those with no data.
Here's a modified version of your DAX measure:
Slicer Count =
COUNTROWS(VALUES(SomeTable[SomeColumn]))
Another DAX measure =
VAR divisor = 9 * [Slicer Count]
RETURN
DIVIDE(
CALCULATE(
[another measure which sums some values],
ALL(Date)
),
divisor,
0
)
n this modified measure:
CALCULATE([another measure which sums some values], ALL(Date)) calculates the sum of your values, but with the context of all dates. This ensures that even if a date has no data, it is still considered in the calculation.
DIVIDE(..., divisor, 0) handles the division and includes a default value of 0 in case the divisor is 0.
This modification should give you the desired behavior where days with no data are included in the calculation, and the percentage is based on the total number of selected values in the slicer.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |