The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a simple graph that i am filtering with a date slicer.
However I want the null values to show when i click on certain dates?
This is when I there is no filtering on the graph.
When I select a specific month, I want all the type of category on the x axis, even if theres no data to show this.
Is there a way we can do this on Power BI?
Solved! Go to Solution.
Hi @ajames95
Leave main data table and calendar table no relationship
Create a measure
Measure = VAR slectedmo = SELECTEDVALUE ( 'calendar'[year-month] ) VAR y_m = FORMAT ( MAX ( 'Table'[date] ), "yyyy-mm" ) RETURN CALCULATE ( SUM ( 'Table'[value] ), FILTER ( 'Table', slectedmo = y_m ) )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ajames95
Leave main data table and calendar table no relationship
Create a measure
Measure = VAR slectedmo = SELECTEDVALUE ( 'calendar'[year-month] ) VAR y_m = FORMAT ( MAX ( 'Table'[date] ), "yyyy-mm" ) RETURN CALCULATE ( SUM ( 'Table'[value] ), FILTER ( 'Table', slectedmo = y_m ) )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Maggie,
I only have one table -
1 Year/Month = FORMAT('Table'[Logged Date],"YYYY-MM")
Hi @ajames95
There is no direct way to slove your problem, so i provide a workaround.
Please create a calendar table:
New Table-> enter this formula
calendar = ADDCOLUMNS(CALENDARAUTO(),"year-month",FORMAT([Date],"yyyy-mm"))
Then follow my methods in the previous post.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @ajames95
Under Axis on the category line pick the down arrow and select 'Show items with no data"
Can you share your .pbix file?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
90 | |
83 | |
64 | |
58 |
User | Count |
---|---|
244 | |
128 | |
118 | |
79 | |
78 |