Forum Discussion
vjnvinod
2 years agoImpactful Individual
Dax Help
hi Experts i have two table calendar table connected to Forward Bookings table and i am using Calendar table period to slice and dice the values, like below In forward Book...
Anonymous
2 years agoNot applicable
Hi vjnvinod ,
First of all, many thanks to vanessafvg for your very quick and effective replies.
Based on my testing, please try the following methods:
1.Create the simple table.
2.Create the new measure to calculate hours.
Sum hours =
VAR calendarPeriod = SELECTEDVALUE('Calendar'[Period])
var notbla = CALCULATE(
SUM('Forward Bookings'[Hours]),
FILTER('Forward Bookings','Forward Bookings'[Engagement Type] = "External Engagement" && 'Forward Bookings'[Period] = calendarPeriod)
)
VAR blan = CALCULATE(
SUM('Forward Bookings'[Hours]),
'Forward Bookings'[Engagement Type] = "External Engagement",
'Calendar'[Period] in {"Period9", "Period10", "Period11", "Period12"}
)
RETURN
IF (
calendarPeriod in {"Period9", "Period10", "Period11", "Period12"},
notbla,
blan
)
3.Select the slicer visual and drag the calendar period field into the visual.
4.Drag the measure into the table visual and select period1.
5.Select the Period10. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- vjnvinod2 years agoImpactful Individual
Anonymous
this needs to be dynamic, data can be anywhere, lets say P5, P9 etc, appears like the above dax, hardcodes the data