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
Kartikb
Frequent Visitor

Aggregation issue.

Hi Guys,

 

I am trying to aggregate comp sales percentage by month, but it is not working properly. However, when I am aggregating the sales numbers they are aggregating properly. Please have a look at the screenshot below, any help would be appreciated.

 

PBI Issue.JPG

 

Thanks

K

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @Kartikb ,

 

Please create a measure using SUMX like that to work on it.

Measure = SUMX(Dimdate,[L4L Comp Sales %])

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

Can you share your formula Sales %. I think you are looking for % of subtotal

 

https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390

 

Also, Create a sort column for you month year like

Month Year Sort = format(Date[Date],"YYYYMM")

And choose that as sort column

Sort_by_column.pngSortnewribbion.png

 

Appreciate your Kudos.

I want to find out average comp sales for the month.
 
Please see the formulas below:
1. L4L Comp Sales % =  DIVIDE([L4L Comp Sales],[L4L Sales LY],BLANK())
2. L4L Sales = CALCULATE
(
    SUM('vwDailyTransactions'[SaleExGST])
    , 'vwDailyTransactions'
     [IsValidL4L_TY]= True()
)
 
3. L4L Sales LY =  CALCULATE
(
    SUM('vwDailyTransactions'[SaleExGST])
    , FILTER(ALL('vwDimDate'), 'vwDimDate'[FYearWeek] = MAX('vwDimDate'[FYearWeek]) - 100)
)
 
Thank for the suggestion regarding the sort column.
 
 

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.