Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
@TarifAlanazi:
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" )
)
)
@TarifAlanazi:
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" )
)
)
Hi @TarifAlanazi,
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
what do you meane about PM?
Private message*
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |