Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I want to calculate the average items per bill in a given dataset
From what I understand this formula:
hI @shikharshah ,
The measure could have been simplified as without using CALCULATE but it wouldn't work as expected. Using an external measure within a DAX expression automatically wraps that measure within CALCULATE so
DistCount = DISTINCTCOUNT('table'[column]) is equivalent to CALCULATE([DistCount]). Not usingCALCULATE means the row context of VALUES('20 Aug'[Bill No]) is never converted to filter context so the same distinct count is evaluvated for each unique item in Bill No. Please see table below:
There is a more detailed explanation in a similar post - https://community.fabric.microsoft.com/t5/Desktop/Using-measure-or-Aggregation-in-AVERAGEX/m-p/44513...
Proud to be a Super User!