Forum Discussion
DistictCount StoreCode with Volume in period versus DistictCount StoreCode Universe (Penetration %)
- 1 year ago
Hi TKCillie
You’re getting 100% because your denominator is being filtered by the month on the axis.
For each month, you’re counting stores that appear in that month in both the top and the bottom, so the ratio becomes 1.Fix: make the denominator ignore the month but still respect higher-level slicers (e.g., Year, Region). Use ALLSELECTED over your Calendar/Date table.
Stores With Vol = CALCULATE( DISTINCTCOUNT( 'Data'[StoreCode] ), KEEPFILTERS( 'Data'[Volume] > 0 ) )Total Stores (Selection) = CALCULATE( DISTINCTCOUNT( 'Data'[StoreCode] ), ALLSELECTED( 'Date'[Date] ) )Penetration % = DIVIDE( [Stores With Vol], [Total Stores (Selection)] )-
Put Month from your Calendar table on the axis, and make sure that table is related to 'Data'[Date] and marked as a date table.
-
If you want the denominator to be your entire store universe regardless of dates, create a separate Stores dimension and use:
Total Stores (Universe) = DISTINCTCOUNT( Stores[StoreCode] ), then Penetration % = DIVIDE([Stores With Vol], [Total Stores (Universe)]).
-
No unfortunately not, it's still giving me strange %'s 😞
Hi TKCillie
You’re getting 100% because your denominator is being filtered by the month on the axis.
For each month, you’re counting stores that appear in that month in both the top and the bottom, so the ratio becomes 1.
Fix: make the denominator ignore the month but still respect higher-level slicers (e.g., Year, Region). Use ALLSELECTED over your Calendar/Date table.
Stores With Vol =
CALCULATE(
DISTINCTCOUNT( 'Data'[StoreCode] ),
KEEPFILTERS( 'Data'[Volume] > 0 )
)Total Stores (Selection) =
CALCULATE(
DISTINCTCOUNT( 'Data'[StoreCode] ),
ALLSELECTED( 'Date'[Date] )
)
Penetration % =
DIVIDE( [Stores With Vol], [Total Stores (Selection)] )
-
Put Month from your Calendar table on the axis, and make sure that table is related to 'Data'[Date] and marked as a date table.
-
If you want the denominator to be your entire store universe regardless of dates, create a separate Stores dimension and use:
Total Stores (Universe) = DISTINCTCOUNT( Stores[StoreCode] ), then Penetration % = DIVIDE([Stores With Vol], [Total Stores (Universe)]).
- TKCillie1 year agoRegular Visitor
THANK YOU SOOOOO MCUH 🙂