March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a column A which has an text data and column B which has Values. I want to check for a period of time the output.
eg - Delivery(value)/box(count) = Sum of column B / Count of Column A. In the data table what is happening is that it is taking the count as 1 and dividing with the value of column B. Hence the row wise result is coming same as the value of column B. I need an output which will calculate for a span of time, say if I take April and May and the delivery value is 40 and 60 resp. and the count is 3 & 2 resp. Then the output should show me 100/5 = 20. But currently as per the below calculation it is giving me an output 100.
Solved! Go to Solution.
Hi @amit_wairkar ,
Please try to update the formula of your measure as below and check whether it can get your expected result.
Measure =
VAR _sumofdelivery =
CALCULATE ( SUM ( 'Table'[Delivery] ), ALLSELECTED ( 'Table' ) )
VAR _countofbox =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Box] ), ALLSELECTED ( 'Table' ) )
RETURN
DIVIDE ( _sumofdelivery, _countofbox, 0 )
If the above one still can't get the correct result, please provide some sample data with Text format and some screenshots that how the visual looks like when you applied the measure.... Thank you.
Best Regards
Hi @amit_wairkar ,
Please try to update the formula of your measure as below and check whether it can get your expected result.
Measure =
VAR _sumofdelivery =
CALCULATE ( SUM ( 'Table'[Delivery] ), ALLSELECTED ( 'Table' ) )
VAR _countofbox =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Box] ), ALLSELECTED ( 'Table' ) )
RETURN
DIVIDE ( _sumofdelivery, _countofbox, 0 )
If the above one still can't get the correct result, please provide some sample data with Text format and some screenshots that how the visual looks like when you applied the measure.... Thank you.
Best Regards
maybe try
SUM('[Table Name]'[Delivery])/DISTINCTCOUNT('[Table Name'[Box]
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |