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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
admin_xlsior
Post Prodigy
Post Prodigy

Budget Allocation without relationship

Hi,

 

I'm wondering can we calculate Budget, without relationship ?

 

For example I have this table

DealerRegionBranchYearMonthWO groupBudget
DEMFWashington RegWashingtonCalendar 2019January 2019External160.00
DEMFWashington RegWashingtonCalendar 2019February 2019External220.00
DEMFWashington RegWashingtonCalendar 2019March 2019External180.00
DEMFWashington RegWashingtonCalendar 2019April 2019External100.00
DEMFWashington RegWashingtonCalendar 2019January 2019Internal160.00
DEMFWashington RegWashingtonCalendar 2019February 2019Internal220.00
DEMFWashington RegWashingtonCalendar 2019March 2019Internal180.00
DEMFWashington RegWashingtonCalendar 2019April 2019Internal200.00
DEMFWashington RegWashingtonCalendar 2019January 2019Warranty160.00
DEMFWashington RegWashingtonCalendar 2019February 2019Warranty220.00
DEMFWashington RegWashingtonCalendar 2019March 2019Warranty220.00
DEMFWashington RegWashingtonCalendar 2019April 2019Warranty260.00
DEMFCalifornia RegCaliforniaCalendar 2019January 2019External160.00
DEMFCalifornia RegCaliforniaCalendar 2019February 2019External220.00
DEMFCalifornia RegCaliforniaCalendar 2019March 2019External180.00
DEMFCalifornia RegCaliforniaCalendar 2019April 2019External160.00
DEMFCalifornia RegCaliforniaCalendar 2019January 2019Internal120.00
DEMFCalifornia RegCaliforniaCalendar 2019February 2019Internal200.00
DEMFCalifornia RegCaliforniaCalendar 2019March 2019Internal100.00
DEMFCalifornia RegCaliforniaCalendar 2019April 2019Internal80.00
DEMFCalifornia RegCaliforniaCalendar 2019January 2019Warranty160.00
DEMFCalifornia RegCaliforniaCalendar 2019February 2019Warranty220.00
DEMFCalifornia RegCaliforniaCalendar 2019March 2019Warranty280.00
DEMFCalifornia RegCaliforniaCalendar 2019April 2019Warranty160.00

Then I created this measures :

Budget Allocation =
    VAR CurrentMonth = SELECTEDVALUE('Date'[Month])
    VAR MonthlyBudgetAmt = CALCULATE([Total Budget-GP], FILTER( ALL('Budget' [Month]), CurrentMonth = 'Budget'[Month]
    )
    )
return MonthlyBudgetAmt

 

This is return correct value :

Month     Budget
January 2019920
February 20191300
March 20191140
April 2019960

 

However I wan to add the other filter like Region and Branch. The slicer, and also the table visualization might need to display those value as well.

 

So at first I tried to add the region frst like this :

Budget Allocation =
    VAR CurrentMonth = SELECTEDVALUE('Date'[Month])
    VAR CurrentRegion = SELECTEDVALUE('Region'[Region])
    VAR MonthlyBudgetAmt = CALCULATE([Total Budget-GP], FILTER( ALL('Budget' [Month]), CurrentMonth = 'Budget'[Month],
FILTER( ALL('Budget' [Region]), CurrentRegion = 'Budget'[Region]
    )
    )
return MonthlyBudgetAmt

 

It just give me blank value.

 

Thanks,

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @admin_xlsior 

You may try below measure or just use budget table's region column as slicer.For further,please refer to attached sample file.

Measure =
VAR CurrentMonth =
    SELECTEDVALUE ( 'Date'[Month] )
VAR CurrentRegion =
    SELECTEDVALUE ( 'Region'[Region] )
VAR MonthlyBudgetAmt =
    CALCULATE (
        [Total Budget-GP],
        FILTER (
            ALL ( 'Budget' ),
            CurrentMonth = 'Budget'[Month]
                && CurrentRegion = 'Budget'[Region]
        )
    )
RETURN
    MonthlyBudgetAmt

Regards,

Community Support Team _ Cherie Chen
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

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @admin_xlsior 

You may try below measure or just use budget table's region column as slicer.For further,please refer to attached sample file.

Measure =
VAR CurrentMonth =
    SELECTEDVALUE ( 'Date'[Month] )
VAR CurrentRegion =
    SELECTEDVALUE ( 'Region'[Region] )
VAR MonthlyBudgetAmt =
    CALCULATE (
        [Total Budget-GP],
        FILTER (
            ALL ( 'Budget' ),
            CurrentMonth = 'Budget'[Month]
                && CurrentRegion = 'Budget'[Region]
        )
    )
RETURN
    MonthlyBudgetAmt

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.