Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Dear platform,
I have a measure that is always showing the MAX value. So if you group the days to a week you won't get 2+3+2+3+2 but you get the Max (in this case not 12 but 99).
I made the following (easy) measure to get the wanted 12:
How do I get the same measure for a month?
FYI, you can use an iterator to sum over the days:
PM_Needed_Present_week =
VAR _Days =
FILTER (
VALUES ( DIM_Calendar[DutchDayName] ),
DIM_Calendar[DutchDayName] IN { "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag" }
)
RETURN
SUMX ( _Days, [PM_Needed_Present] )
If you want to sum over all days, then you can just write:
PM_Needed_Present_week =
SUMX (
VALUES ( DIM_Calendar[DutchDayName] ),
[PM_Needed_Present]
)
Thanks a lot! Also something I was looking for.
How would this work for the sum over a month instead of a week?
Same syntax but replace the day columns with the month column.
For example:
PM_Needed_Present_week =
VAR _Months =
FILTER (
VALUES ( DIM_Calendar[DutchMonthName] ),
DIM_Calendar[DutchMonthName] IN { "mei", "juni", "juli" }
)
RETURN
SUMX ( _Months, [PM_Needed_Present] )
@Ilse_ScpDt , Assume this is a measure: PM_Needed_Present
A measure like
Maxx(Values(DIM_Calendar[DutchDayName]),[PM_Needed_Present])
Thanks for the reply.
I am not looking for the maximum value, but trying to sum all values of the seperate days. For the week I can use the measures above. But how would it work for a month?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 47 | |
| 44 | |
| 20 | |
| 20 |
| User | Count |
|---|---|
| 72 | |
| 70 | |
| 34 | |
| 33 | |
| 31 |