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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

User selectable values from dim table

Hello,
I am implementing a new feature on a report page which allows a user to select which list of values from dim_table01 will then be used to filter three fact tables. The goal here is for the user to pick one of three options, 'sel_01', 'sel_02', or 'sel_all' from some kind of visual, perhaps a button slicer, which filters the dim_table01[col-00] according to "true" values in the corasponding column.  i.e. If the user chose 'sel_01', then values in dim_table01[col-00] would be selected where col-01 = true. 

 

The image is showing the data model layout with:
     2 dim tables, dim_table01 and dim_type (disconnected table)
    3 fact tables, fact_table01, fact_table02 and fact_table03
    an example of user selectable buttons
    expected outcome based on user's selection
    and my logical thought for a solution

I am asking for help on how to achieve the original goal of allowing a user to select which list of values from dim_table01 will then be used to filter three fact tables.

I am open to all ideas.  --- Thanks

sleepingdog_0-1729796886738.png

 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I made a sample for you.

vxiaocliumsft_0-1729825278165.png

vxiaocliumsft_1-1729825308018.png

 

Measure = SWITCH(
    SELECTEDVALUE('dim_type'[type]),
    "sel_01",
    IF( VALUES( 'dim_table01'[col-01])=TRUE(),CALCULATE( SUM('fact_table01'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table01[fact_c01])),BLANK()),
    "sel_02",
    IF( VALUES( 'dim_table01'[col-02])=TRUE(),CALCULATE( SUM('fact_table02'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table02[fact_c01])),BLANK()),
    "sel_all",
    IF( VALUES( 'dim_table01'[col-all])=TRUE(),CALCULATE( SUM('fact_table03'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table03[fact_c01])),BLANK())
)

 

Best Regards,

Wearsky

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

I made a sample for you.

vxiaocliumsft_0-1729825278165.png

vxiaocliumsft_1-1729825308018.png

 

Measure = SWITCH(
    SELECTEDVALUE('dim_type'[type]),
    "sel_01",
    IF( VALUES( 'dim_table01'[col-01])=TRUE(),CALCULATE( SUM('fact_table01'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table01[fact_c01])),BLANK()),
    "sel_02",
    IF( VALUES( 'dim_table01'[col-02])=TRUE(),CALCULATE( SUM('fact_table02'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table02[fact_c01])),BLANK()),
    "sel_all",
    IF( VALUES( 'dim_table01'[col-all])=TRUE(),CALCULATE( SUM('fact_table03'[value]),USERELATIONSHIP(dim_table01[col-00],fact_table03[fact_c01])),BLANK())
)

 

Best Regards,

Wearsky

lbendlin
Super User
Super User

Are you trying to reinvent the Field Parameters feature?

Anonymous
Not applicable

I have tried Filed Parameters (FPs). I created a FP which inlcluded col-01, col-02 and col-all. I found the  FP would switch between the columns however, switching the column is not enough to filter  dim_table01 and there by filter the fact_tables.
I tried replacing the true/false values in the col-01,col-02 & col-all with values from col-00.  True = col-00 valus; False = blank.

How about enabling "Personalize Visuals"  and train your users in how to use that?

Anonymous
Not applicable

thank you for the suggestion, however, I do not see that as an option right now.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors
Top Kudoed Authors