Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vs_7
Responsive Resident
Responsive Resident

How to find partners cummulative sales

hi,

please help to find the partner cummulative sales from total sales.

please check below data in table format.

 

DateC Month NumC YearF YearQuarterDisplay YearMonth NamePARTNERCODENETVALUEUnitUnit ValuesSort
01-05-2019520192019Q12019-2020JanuaryMY05I2348547042.44CR100000003
02-05-2019520192019Q12019-2020JanuaryMR05I2191051750.32Lac1000002
03-05-2019520192019Q12019-2020JanuaryMR05I2191028525.18K10001
04-05-2019520192019Q12019-2020January30APP0410021070.3   
05-05-2019520192019Q12019-2020January30APP0410030000   
06-05-2019520192019Q12019-2020JanuaryFI05A19162900   
07-05-2019520192019Q12019-2020JanuaryFI05A1916262819.11   
08-05-2019520192019Q12019-2020JanuaryFI05A1916250391.09   
09-05-2019520192019Q12019-2020January30ANA0410088000   
10-05-2019520192019Q12019-2020JanuaryRETAIL41002098.36   
01-07-2019720192019Q22019-2020January30APP0410020800   
02-07-2019720192019Q22019-2020January30APP0410022500   
03-07-2019720192019Q22019-2020January30APP041006250   
04-07-2019720192019Q22019-2020January30APP04100557839.98   
05-07-2019720192019Q22019-2020January30APP0410089640   
06-07-2019720192019Q22019-2020January30APP041001430047.94   
07-07-2019720192019Q22019-2020January30APP04100480791.98   
08-07-2019720192019Q22019-2020January30APP0410088375   
09-07-2019720192019Q22019-2020January30LED04100156000   
10-07-2019720192019Q22019-2020JanuarySYS05I67111671597.54   
01-10-20191020192019Q32019-2020JanuarySYS05I6711815413.44   
02-10-20191020192019Q32019-2020JanuarySYS05I67112832489.18   
03-10-20191020192019Q32019-2020JanuarySYS05I671138610   
04-10-20191020192019Q32019-2020JanuaryDA05I23887930600   
05-10-20191020192019Q32019-2020JanuaryFI05A1916255276.2   
06-10-20191020192019Q32019-2020January30SYS0410080000   
07-10-20191020192019Q32019-2020January30SYS041002450000   
08-10-20191020192019Q32019-2020January30INT041008840000   
09-10-20191020192019Q32019-2020January30INT04100320000   
10-10-20191020192019Q32019-2020JanuaryEG02I274334696530.55 

 

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @vs_7 

 

Try this:

Measure = 
CALCULATE(SUM('Table'[NETVALUE]),FILTER(ALL('Table'),'Table'[PARTNERCODE]=MAX('Table'[PARTNERCODE])&&'Table'[Date]<=MAX('Table'[Date])))

Result:

vangzhengmsft_1-1645753371951.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
vs_7
Responsive Resident
Responsive Resident

HI @v-angzheng-msft,

I have tried above measure but im getting error and i have used total Revenue measure for Netvalue.

i'm having date in Master calender table 

please check screenshot below.

 
Measure =
CALCULATE(SUM('sales'[Total Revenue]),FILTER(ALL('Sales'),'Sales'[PARTNERCODE]=MAX('Sales'[PARTNERCODE])&&'Master_calender'[Date]<=MAX('Master_Calendar'[Date])))
 
vs_7_0-1645761345546.png

 

Hi, @vs_7 
Please try to sum the column directly, not to the measure.Or remove the summation.

Measure =
CALCULATE (
    SUM ( 'sales'[TheColumn_NotMeasure] ),
    FILTER (
        ALL ( 'Sales' ),
        'Sales'[PARTNERCODE] = MAX ( 'Sales'[PARTNERCODE] )
            && 'Master_calender'[Date] <= MAX ( 'Master_Calendar'[Date] )
    )
)

Or

Measure =
CALCULATE (
    'sales'[TheMeasure],
    FILTER (
        ALL ( 'Sales' ),
        'Sales'[PARTNERCODE] = MAX ( 'Sales'[PARTNERCODE] )
            && 'Master_calender'[Date] <= MAX ( 'Master_Calendar'[Date] )
    )
)

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-angzheng-msft
Community Support
Community Support

Hi, @vs_7 

 

Try this:

Measure = 
CALCULATE(SUM('Table'[NETVALUE]),FILTER(ALL('Table'),'Table'[PARTNERCODE]=MAX('Table'[PARTNERCODE])&&'Table'[Date]<=MAX('Table'[Date])))

Result:

vangzhengmsft_1-1645753371951.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.