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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Bastienlin_
Helper II
Helper II

Dynamical dimension table

Hello,

I have an issue where my dimension table is changing over the years. What I tried to do to deal with it, is to add a date to all my tables so that I can filter the right lines in my dimension table.
My goal is to have a dynamical dimension table that is changing depending on the date.
Here is a sample of my data:
I have no "Orange Juice" in 2022 in my ref_Company because it isn't in our scope anymore, but it is still here in my fact table (Price):
Ref_Company(Dimension table):

Bastienlin__0-1651707225060.png
Price(Fact table):

Bastienlin__1-1651707238845.png
Ref_Date(Dimension table):

Bastienlin__2-1651707224589.png

 

What i expected is that, when I select 2022, when I select 2022we can not see the Orange_index on my visual. But here is what I have:

Bastienlin__3-1651707223765.png

 

It seems that it still manage to get the Orange_Index from 2021 in my Ref_Company. So my ref_Company isn't dynamic.
My goal is to have my Ref_company dynamic depending on the date I select on my slicer.


Do you know how can I deal with this issue ? (Note that I have a lot of facts table like my Price table, so I can not just delete the lines about Orange Juice).
And if you think that my solution about adding a date to my Ref_company isn't a good one, feel free to explain another solution to me.
PBIX file: https://www.dropbox.com/s/t58ujxuo1ppl2bm/Dynamic%20dimension%20table%20depending%20on%20the%20Date....

Thank you very much for your help !

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Bastienlin_ ,

 

Please firstly make the relationship between Price table and Ref_Date table inactive:

Eyelyn9_1-1652151955093.png

Then create a flag measure:

Flag = 
var _t=SUMMARIZE(FILTER(ALL('Ref_Company'),[Date]=SELECTEDVALUE('Ref_Date'[Date])),[Index])
return IF(MAX('Price'[Index]) in _t && MAX('Price'[Date])=SELECTEDVALUE(Ref_Date[Date])   ,1,0)

And apply it to visual-filter pane, set as "is 1" as shown below:

 

Eyelyn9_0-1652151906589.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors