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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply

context change

aggregation at customer name level
 

desired output 

Month Total 2023 Total 2024 LFL 2023 LFL 2024

Jan20352027
Feb21312122
Mar20372028
Apr32331233

Goal:

  1. Total 2023: Sum the sales for 2023 for each month.
  2. Total 2024: Sum the sales for 2024 for each month.
  3. LFL 2023: For each month, calculate the total 2023 sales only for stores that have sales in both 2023 and 2024 for that same month.
  4. LFL 2024: For each month, calculate the total 2024 sales only for stores that have sales in both 2023 and 2024 for that same month.


data

Month Store 2023 Sales 2024 Sales

JanS231012
JanS241015
JanS25(blank)8
FebS231211
FebS24911
FebS25(blank)9
MarS23(blank)9
MarS241518
MarS25510
AprS2320(blank)
AprS24221
AprS251012
3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1735696998300.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
bhanu_gautam
Super User
Super User

@Hemant_Jaiswar , 

Create the following measures to calculate the totals and LFL (Like-for-Like) sales.

Total 2023 Sales = SUM('Sales'[2023 Sales])

 

Total 2024 Sales = SUM('Sales'[2024 Sales])

 

 


LFL 2023 Sales =
CALCULATE(
SUM('Sales'[2023 Sales]),
FILTER(
'Sales',
NOT(ISBLANK('Sales'[2023 Sales])) && NOT(ISBLANK('Sales'[2024 Sales]))
)
)


LFL 2024 Sales =
CALCULATE(
SUM('Sales'[2024 Sales]),
FILTER(
'Sales',
NOT(ISBLANK('Sales'[2023 Sales])) && NOT(ISBLANK('Sales'[2024 Sales]))
)
)

 

Go to the "Visualizations" pane and select the "Table" visualization.
Drag the "Month" column to the table.
Drag the measures you created (Total 2023 Sales, Total 2024 Sales, LFL 2023 Sales, LFL 2024 Sales) to the table.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






  1. this has to be done at store level without keeping store at that views and check each store via months only when sales is present in both the month that store should be calculated in total sales for that month
    LFL 2023
    : For each month, calculate the total 2023 sales only for stores that have sales in both 2023 and 2024 for that same month.
  2. LFL 2024: For each month, calculate the total 2024 sales only for stores that have sales in both 2023 and 2024 for that same month. please note

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors