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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
I have the below measure that multiplies by number of days in Month.
Single Month
Solved! Go to Solution.
I think you can use
TNUoS_Measure =
SUMX (
VALUES ( DateTime_Calendar[Year Month] ),
CALCULATE (
SUM ( 'F_BATTERY_NON_TRADER_REVENUES'[TNUoS charges per SP] ) * 48
* SELECTEDVALUE ( DateTime_Calendar[Days in Month] )
)
)
Hi @Anonymous
First of all, thanks to johnt75, ajohnso2 and Bibiano_Geraldo for their great replies to this question.
May I ask if their replies has helped you solve your problem? If so, please consider accepting the reply that helped you as a solution, which will benefit users experiencing similar problems.
If you have any other questions, please feel free to contact me.
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
The issue arises because SELECTEDVALUE() returns a value only if a single value is selected in the column. When you select multiple months or a year, the context no longer contains a single value for DateTime_Calendar[Days in Month], causing SELECTEDVALUE() to return BLANK().
To handle this, you can use the bellow DAX:
TNUoS_Measure =
SUM('F_BATTERY_NON_TRADER_REVENUES'[TNUoS charges per SP]) * 48 *
SUMX(
VALUES(DateTime_Calendar[MonthYear]),
MAX(DateTime_Calendar[Days in Month])
)
If you need a sum of the total days across all selected months (e.g., for overlapping or partial months you can use bellow DAX:
TNUoS_Measure =
SUM('F_BATTERY_NON_TRADER_REVENUES'[TNUoS charges per SP]) * 48 *
SUM(DateTime_Calendar[Days in Month])
I hope this help you, if yes please give a Kudo and accept as solution.
Thank you
First i created a measure to count the number of selected (month slicer) days in each month.
I think you can use
TNUoS_Measure =
SUMX (
VALUES ( DateTime_Calendar[Year Month] ),
CALCULATE (
SUM ( 'F_BATTERY_NON_TRADER_REVENUES'[TNUoS charges per SP] ) * 48
* SELECTEDVALUE ( DateTime_Calendar[Days in Month] )
)
)
Hi @johnt75,
Thank you for this, where you have
VALUES ( DateTime_Calendar[Year Month] )
Are you expecting a value of say October 2024 for example?
Yes, precisely. I usually have a column in the date table which is the start of the month as a date, formatted to display as e.g. "Oct 2024". Very useful in slicers and visuals when you don't want to report down to the day level.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.