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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Matrix total

Greetings supporter,

 

I have two values when i put on the total first value calculated by column that is right, and Second value by Row that is wrong as the below total. how to make both value calculate by columns 

 

your supprot is highlty appreciated

 

 

 

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Anonymous: 
Create a date dimension table and use the columns from that table in your visual instead of the date columns from the fact table.
You can use this code for the calculated table:

 

Date = 
GENERATE (
    CALENDARAUTO (),
    VAR Yr = YEAR ( [Date] )
    VAR Mn = MONTH ( [Date] )
    VAR Qr = QUARTER ( [Date] )
    VAR MnQ = Mn - 3 * (Qr - 1)
    VAR Wd = WEEKDAY ( [Date], 2 )
    RETURN ROW (
        "Year", Yr,
        "Year Quarter", FORMAT ( [Date], "\QQ-YYYY" ),
        "Year Quarter Sorting", Yr * 100 + Qr,
        "Quarter", FORMAT ( [Date], "\QQ" ),
        "Year Month", FORMAT ( [Date], "MMM-YYYY" ),
        "Year Month Sorting", Yr * 100 + Mn,
        "Month", Mn,
        "Day of Week", Wd,
        "Week Day", FORMAT ( [Date], "dddd" )
    )
)

 




2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

View solution in original post

5 REPLIES 5
SpartaBI
Community Champion
Community Champion

@Anonymous: 
Create a date dimension table and use the columns from that table in your visual instead of the date columns from the fact table.
You can use this code for the calculated table:

 

Date = 
GENERATE (
    CALENDARAUTO (),
    VAR Yr = YEAR ( [Date] )
    VAR Mn = MONTH ( [Date] )
    VAR Qr = QUARTER ( [Date] )
    VAR MnQ = Mn - 3 * (Qr - 1)
    VAR Wd = WEEKDAY ( [Date], 2 )
    RETURN ROW (
        "Year", Yr,
        "Year Quarter", FORMAT ( [Date], "\QQ-YYYY" ),
        "Year Quarter Sorting", Yr * 100 + Qr,
        "Quarter", FORMAT ( [Date], "\QQ" ),
        "Year Month", FORMAT ( [Date], "MMM-YYYY" ),
        "Year Month Sorting", Yr * 100 + Mn,
        "Month", Mn,
        "Day of Week", Wd,
        "Week Day", FORMAT ( [Date], "dddd" )
    )
)

 




2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Anonymous
Not applicable

Hi @Anonymous,

You can take a look at the following link about Dax measure total calculation issue if helps:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

SpartaBI
Community Champion
Community Champion

@Anonymous you can PM me and we could do a zoom to look together.

Anonymous
Not applicable

what do you meane about PM?

Private message*

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.