Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 Bookings table i only have data from P10 onwards, so when i select P1, it shows me blank (which obviously what it is), but i am trying to achieve here is, when i selecte P1, if there is no data, it should still show me the available data like P9 to P12
this is my current Dax, please let me know, what i can modify in the dax to achieve the outputs as not blan
CALCULATE( SUM('Forward Bookings'[Hours]), 'Forward Bookings'[Engagement Type] = "External Engagement" )
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.
@Anonymous
this needs to be dynamic, data can be anywhere, lets say P5, P9 etc, appears like the above dax, hardcodes the data
why dont you just add a select all to your slicer settings? i dont really understand the purpose of what you are asking, you can achieve a similar result if you if you add a select all to your slicer in slicer settings (check the settings of the slicer to add this in) then you can just select all that and it will return only the period that have values?
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
54 | |
54 | |
37 | |
29 |
User | Count |
---|---|
78 | |
64 | |
45 | |
40 | |
40 |