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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
RustyNails
Helper III
Helper III

How to select Column fields as drop down filters, and calculate measures dynamically

Hi All, I have a requirement that was satisfied with Tableau but I'm having difficulty porting it to Power BI.

 

The request is for a user to select any two date column fields they want from a dropdown list, and based on their selection the result should give you an average of date difference. In Tableau I was able to automatically select the fields I wanted, and based on my selection I could do any calculations between them.

 

An example of what I'm talking about, here is what the structure looks like (obviously there's ton more, but this gets the point across)

PBI_DataStructure.JPG

 

And here's what the end result should look like

 

PBI_Dashboard.JPG

 

The request is borne out of the fact that we have hundreds of Date fields, and we need a historical trend of averages between them. Is there a way to convert the columns to rows, preferably in the report section? Any help is appreciated.

 

Thanks!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@RustyNails,

 

You may try Unpivot Columns in the Query Editor or use UNION Function in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@RustyNails,

 

You may try Unpivot Columns in the Query Editor or use UNION Function in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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