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

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.

Reply
klehar
Helper V
Helper V

Mapping 1 column values to date columns in matrix

Hi,

 

For simplification, striping down the actual problem.

I have 2 datasets that look like this:

 

Geo Dates budget (Fact Table)

klehar_0-1621606429866.png

 

Dates (Dim Table)

 

klehar_5-1621606485379.png

 

Geo: (Dim Table)

klehar_7-1621606636429.png

 

I have created a mapping between these tables in model as follows

klehar_8-1621606697871.png

I have a simple requirement

 

I want a table like this

 FY21       
 Q1Q2Q3Q4    
Budget10131418When India is selected from the Geo table
Budget14121110When US is selected from the Geo table
Budget24252528When nothing/all values are selected
         

 

 

I was trying to use inscope or infiltered, but im not getting the results.

Can someone help?

 

Power BI file link here

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @klehar ,

I checked your sample pbix file again, found there was a relationship created between Date table and Geo Date Budget table based on the field [Fiscal Year Quarter]. But as you see, their data format are totally different. So if the relationship exist, the visual will not display any value due to there is no common value....

DateDate Geo Date BudgetGeo Date Budget

I updated your sample pbix file again, it include the following steps. Please find the details in the attachment.

1. Delete the relationship between Date table and Geo Date Budget table 

2. Update the measure [ARR Budget]

ARR Budget = 
VAR _tab =
    SUMMARIZE (
        'Geo Date Budget',
        'Geo Date Budget'[Geo],
        "budget",
            CALCULATE (
                SUM ( 'Geo Date Budget'[Budget] ),
                FILTER (
                    ALLSELECTED ( 'Geo Date Budget' ),
                    'Geo Date Budget'[Geo] = SELECTEDVALUE ( 'Geo Date Budget'[Geo] )
                        && RIGHT ( 'Geo Date Budget'[Fiscal Year Quarter], 4 )
                            = RIGHT ( SELECTEDVALUE ( 'Date'[Fiscal Year Quarter] ), 4 )
                )
            )
    )
RETURN
    SUMX ( _tab, [budget] )
Measure = SUMX(GROUPBY('Date','Date'[Year],'Date'[Quarter]),[ARR Budget])

3. Create matrix

yingyinr_2-1622024333218.png

Best Regards

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @klehar ,

I updated your sample pbix file, please find the attachment for the details. 

1. Create 2 calculated columns as below in Geo Date Budget table to get the fiscal year and quarter

Fiscal Year = LEFT('Geo Date Budget'[Fiscal Year Quarter],4)
Quarter = RIGHT('Geo Date Budget'[Fiscal Year Quarter],2)

2. Create a matrix visual (Rows: Geo  Columns: new created calculated columns  Values: sum of Budget)

yingyinr_0-1621936093855.png

Best Regards

@Anonymous I want the Year and Quarter on the column shelf coming from the dates table.

 

Anonymous
Not applicable

Hi @klehar ,

I checked your sample pbix file again, found there was a relationship created between Date table and Geo Date Budget table based on the field [Fiscal Year Quarter]. But as you see, their data format are totally different. So if the relationship exist, the visual will not display any value due to there is no common value....

DateDate Geo Date BudgetGeo Date Budget

I updated your sample pbix file again, it include the following steps. Please find the details in the attachment.

1. Delete the relationship between Date table and Geo Date Budget table 

2. Update the measure [ARR Budget]

ARR Budget = 
VAR _tab =
    SUMMARIZE (
        'Geo Date Budget',
        'Geo Date Budget'[Geo],
        "budget",
            CALCULATE (
                SUM ( 'Geo Date Budget'[Budget] ),
                FILTER (
                    ALLSELECTED ( 'Geo Date Budget' ),
                    'Geo Date Budget'[Geo] = SELECTEDVALUE ( 'Geo Date Budget'[Geo] )
                        && RIGHT ( 'Geo Date Budget'[Fiscal Year Quarter], 4 )
                            = RIGHT ( SELECTEDVALUE ( 'Date'[Fiscal Year Quarter] ), 4 )
                )
            )
    )
RETURN
    SUMX ( _tab, [budget] )
Measure = SUMX(GROUPBY('Date','Date'[Year],'Date'[Quarter]),[ARR Budget])

3. Create matrix

yingyinr_2-1622024333218.png

Best Regards

klehar
Helper V
Helper V

@Greg_Deckler can you please help?

amitchandak
Super User
Super User

@klehar , I think you need to correct Date table Geotable join. I created new key columns in both tables and joined again. See of attached file can help

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak not sure if this is the right approach

All quarters will join to the first month in the dataset

Also the moment i pull in any measures in the matrix it stops working

@klehar , I think isinscope was the problem in measure. do you need that now in this display?

I tried like

ARR Budget = 
SUM ('Geo Date Budget'[Budget]) 

 

and it worked.

 

Also, I usually create dates, even if data is qtr, month, or at year level, and use end date or qtr or month or year.

 

That allows me to use closingbalancemonth, closingbalancequarter, closingbalanceyear.

That gives the same number across that period.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.