Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
desired output
Month Total 2023 Total 2024 LFL 2023 LFL 2024
| Jan | 20 | 35 | 20 | 27 |
| Feb | 21 | 31 | 21 | 22 |
| Mar | 20 | 37 | 20 | 28 |
| Apr | 32 | 33 | 12 | 33 |
data
Month Store 2023 Sales 2024 Sales
| Jan | S23 | 10 | 12 |
| Jan | S24 | 10 | 15 |
| Jan | S25 | (blank) | 8 |
| Feb | S23 | 12 | 11 |
| Feb | S24 | 9 | 11 |
| Feb | S25 | (blank) | 9 |
| Mar | S23 | (blank) | 9 |
| Mar | S24 | 15 | 18 |
| Mar | S25 | 5 | 10 |
| Apr | S23 | 20 | (blank) |
| Apr | S24 | 2 | 21 |
| Apr | S25 | 10 | 12 |
Why have you posted this question multiple times. See my response here - context change - Microsoft Fabric Community
Hi @Hemant_Jaiswar ,
I want to acknowledge valuable input provided by Kedar_Pande . Their initial ideas help guide my approach. However, I noticed that more details are needed to fully understand this issue.
(1) Create a column.
Flag = IF([2023 Sales]<>BLANK() && [2024 Sales]<> BLANK(),1,0)
(2) Then create a new table.
Table 2 =
ADDCOLUMNS (
VALUES ( 'Table'[Month] ),
"Total 2023",
CALCULATE (
SUM ( 'Table'[2023 Sales] ),
FILTER ( 'Table', 'Table'[Month] = EARLIER ( 'Table'[Month] ) )
),
"Total 2024",
CALCULATE (
SUM ( 'Table'[2024 Sales] ),
FILTER ( 'Table', 'Table'[Month] = EARLIER ( 'Table'[Month] ) )
),
"LFL 2023",
CALCULATE (
SUM ( 'Table'[2023 Sales] ),
FILTER ( 'Table', [Flag] = 1 && 'Table'[Month] = EARLIER ( 'Table'[Month] ) )
),
"LFL 2024",
CALCULATE (
SUM ( 'Table'[2024 Sales] ),
FILTER ( 'Table', [Flag] = 1 && 'Table'[Month] = EARLIER ( 'Table'[Month] ) )
)
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
no
Month Total 2023 Total 2024 LFL 2023 LFL 2024
| Jan | 20 | 35 | 20 | 27 |
| Feb | 21 | 31 | 21 | 22 |
| Mar | 20 | 37 | 20 | 28 |
| Apr | 32 | 33 | 12 | 33 |
Use the following DAX measures:
Total 2023 = SUM('Table'[2023 Sales])
Total 2024 = SUM('Table'[2024 Sales])LFL 2023 =
CALCULATE(
SUM('Table'[2023 Sales]),
FILTER(
'Table',
NOT(ISBLANK('Table'[2023 Sales])) &&
NOT(ISBLANK('Table'[2024 Sales]))
)
)
LFL 2024 =
CALCULATE(
SUM('Table'[2024 Sales]),
FILTER(
'Table',
NOT(ISBLANK('Table'[2023 Sales])) &&
NOT(ISBLANK('Table'[2024 Sales]))
)
)
Create a table visual with Month as rows and the four measures as columns.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 81 | |
| 73 | |
| 46 | |
| 35 |