Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Davidglol123
New Member

Data Last Year not shown when using a filter for Locations?

Hi Power BI Forum,

I have used tremendous time on figuring out how to solve this issue. I have a Date Dim and a fact table, where I related the fact dates into date Dim. Therefore, I can filter using my date dim. I'm interresting further, to use my Location Dim, so sort out what location I wanna show based on my fact table. 

The following DAX is used : 

CO2_Green_KPI= CALCULATE([CO2_Per_Kg],DATEADD('Dato Dimension'[Date], -1, YEAR))

(Additonally, I also used sameperiodelastyear and tried to add ALL(Date) as other users have mentioned.

The following Picture shown here is that it works, when I have no filter on location therfore "all"
 
Davidglol123_0-1658406778765.png

But, when I choose what of the location I end up with the following result 

Davidglol123_1-1658406838123.png

 

I'm Interrested in having the line aswell, when location is choosen.

I tried to revoke the problem, by dragging a table out and put my location and CO2_Green_KPI into it, and the following error was displayed :
Davidglol123_2-1658406948187.png

 

 I mean, do understand the problem but it just doesn't make sense to me?

Any help will be appericated. 

Regards,
David.
3 REPLIES 3
amitchandak
Super User
Super User

@Davidglol123 , You can not have bi-directional relationship with the date table. It causes Time intelligence to fail. Make it single directional

Refer

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

right now I have my date table single to many into my fact table. Aint that correct?

 

thanks!

Hi @Davidglol123 

 

Did you use the [CO2_Green_KPI] measure for the line? Can you show the DAX for the measure [[CO2_Per_Kg]]? In addition, you need to use the Dim Location's location column in the slicer, and create a one-to-many relationship to the location in Fact table. 

 

Best Regards,
Community Support Team _ Jing

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.