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
davidibi4524
Frequent Visitor

help

hi

i have two tables:

Grouped forecast and

Forecast lookup

 

grouped forecast looks like this:

Month-yearSUMyeardatabase
6202115002021MTR
7202120002021MTR
820211202021MEX
920212002021MEX

And forecast lookup looks like this:

Fmonth-yearMonthDatabase
120211MTR
220212MTR
320213MEX

 

Then, in the lookup forecast table i have two "lookupvalue" columns 

from grouped forecast, one for the "mex" database and other for "mtr" database.

(I have to leave the LOOKUPVALUE for all sorts of reasons)

i am looking for a solution to filter the lookupvalue columns and aloow to choose wich database the user want to see the data for..

 

i created a table called "DATABASE" and contain "mtr" and "mex"

and i created a relationship between "DATABASE" and "GROUPED FORECAST" but its not effect the "LOOKUPVALUES" columns.

 

thanks 🙂

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @davidibi4524 

 

If your forecast lookup table looks like this:

071408.jpg

You can create a measure to display the value based on which database is selected in a slicer.

Display Value = 
SWITCH (
    SELECTEDVALUE ( DATABASE[database] ),
    "MTR", SELECTEDVALUE ( 'forecast lookup'[MTR value] ),
    "MEX", SELECTEDVALUE ( 'forecast lookup'[MEX value] )
)

071409.jpg

 

If your forecast lookup table looks like grouped forecast table which has a column for database name and another column for corresponding value, you can create a relationship between DATABASE table and forecast lookup table on database columns. Then the database slicer is able to filter it according to the selected database.

071410.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @davidibi4524 

 

If your forecast lookup table looks like this:

071408.jpg

You can create a measure to display the value based on which database is selected in a slicer.

Display Value = 
SWITCH (
    SELECTEDVALUE ( DATABASE[database] ),
    "MTR", SELECTEDVALUE ( 'forecast lookup'[MTR value] ),
    "MEX", SELECTEDVALUE ( 'forecast lookup'[MEX value] )
)

071409.jpg

 

If your forecast lookup table looks like grouped forecast table which has a column for database name and another column for corresponding value, you can create a relationship between DATABASE table and forecast lookup table on database columns. Then the database slicer is able to filter it according to the selected database.

071410.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

MFelix
Super User
Super User

Hi @davidibi4524 ,

 

In this setup believe that the best option is to:

  • Add a date column on both of the tables that would replace the Month-year column
  • Add two dimension tables to your model
    • Calendar table
    • database table (already created)
  • Make a one to many relationship between the previous tables and the two table you already have 
  • Now you can create all sort of calculations based on this using measure and the two dimension tables in your visualizations no need for lookup

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.