Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I want to divide the latest AR value with sum of Salesand then multiply it with number of Days. But when I am dividing it with total sales value it is automatically dividing it with all week sales. I am attaching my data as well as outcome I want to have. Kindly have a look at it. A help would be highly appreciated.
Thank you
Weeknum | Sales | AR | Days in week |
1 | $ 594,935.76 | $ 343,466,767 | 7 |
2 | $ 423,051.96 | $ 67,955,894 | 14 |
3 | $ 378,467.79 | $ 568,569 | 21 |
4 | $ 379,376.90 | $ 8,990,955 | 28 |
5 | $ 459,192.74 | $ 17,413,341 | 35 |
6 | $ 1,065,006.10 | $ 25,835,727 | 42 |
7 | $ 642,491.90 | $ 5,201,533 | 49 |
Outcome I need is for week 7 it would be ($ 5,201,533/$ 3,942,523.15) * 49 = 64.533
64.533 would be the outcome for week 7.
Solved! Go to Solution.
Hi @Junaid11 ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _selweek =
SELECTEDVALUE ( 'Table'[Weeknum] )
VAR _sales =
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Table' ), 'Table'[Weeknum] <= _selweek )
)
VAR _ar =
CALCULATE (
SUM ( 'Table'[AR] ),
FILTER ( 'Table', 'Table'[Weeknum] = _selweek )
)
VAR _days =
CALCULATE (
MAX ( 'Table'[Days in week] ),
FILTER ( 'Table', 'Table'[Weeknum] = _selweek )
)
RETURN
DIVIDE ( _ar, _sales ) * _days
Best Regards
Hi @Junaid11 ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _selweek =
SELECTEDVALUE ( 'Table'[Weeknum] )
VAR _sales =
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Table' ), 'Table'[Weeknum] <= _selweek )
)
VAR _ar =
CALCULATE (
SUM ( 'Table'[AR] ),
FILTER ( 'Table', 'Table'[Weeknum] = _selweek )
)
VAR _days =
CALCULATE (
MAX ( 'Table'[Days in week] ),
FILTER ( 'Table', 'Table'[Weeknum] = _selweek )
)
RETURN
DIVIDE ( _ar, _sales ) * _days
Best Regards
Hi @Junaid11
Please try this
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
74 | |
43 | |
38 | |
31 |
User | Count |
---|---|
166 | |
90 | |
65 | |
46 | |
43 |