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
ablacknerd
Helper I
Helper I

Use Slicer to dynamically change between Date Columns in Table Visual

I need to create a table visualization that shows either the request created within the past 20 days or request that are completed within the last 20 days using a slicer or chiclet with two options: Created, Complete.  Is this possible?

 

I have the following source data structure

Request

Request Created Completed
A 07/14/2020 08/25/2020
B 08/14/2020 08/20/2020
C 08/20/2020 08/24/2020
D 08/20/2020 null
E 08/23/2020 null

 

If I select the created option in my slicer/chiclet I would like to show the following:

Date Request
08/14/2020 B
08/20/2020 C
08/20/2020 D
08/23/2020 E

 

But if i click the completed option in slicer/chiclet I would like the table visualization to show:

Date Request
08/20/2020 B
08/24/2020 C
08/25/2020 A
2 ACCEPTED SOLUTIONS

Hi @ablacknerd

The easiest solution is to unpivot the Created and Completed columns

lkalawski_0-1598910052902.png

 

Add the Request and value fields to the table, and add a filter for value - the last 20 days.

lkalawski_1-1598910091451.png

Use Attribute as a slicer.

lkalawski_0-1598910213457.png

 



_______________
If I helped, please accept the solution and give kudos! 😀

View solution in original post

@ablacknerd

Yes, you can do this in Power Query editor. 

When you download data to Power BI, click Edit or Transform, and a Power Query window will appear.
If you have closed it, click on the Transform Data icon.

lkalawski_0-1598910576664.png

In the Query editor select (with Ctrl) two columns and click unpivot Columns and that's it. Apply changes and do next steps.

lkalawski_1-1598910671543.png



_______________
If I helped, please accept the solution and give kudos! 😀

 

 

View solution in original post

6 REPLIES 6
ablacknerd
Helper I
Helper I

I made some mistakes in the values displayed in my original post.  This has been corrected. 

Hi @ablacknerd

The easiest solution is to unpivot the Created and Completed columns

lkalawski_0-1598910052902.png

 

Add the Request and value fields to the table, and add a filter for value - the last 20 days.

lkalawski_1-1598910091451.png

Use Attribute as a slicer.

lkalawski_0-1598910213457.png

 



_______________
If I helped, please accept the solution and give kudos! 😀

My Data source is a Sharepoint list.  Is there a way I could unpivot the data in power bi instead of the source

@ablacknerd

Yes, you can do this in Power Query editor. 

When you download data to Power BI, click Edit or Transform, and a Power Query window will appear.
If you have closed it, click on the Transform Data icon.

lkalawski_0-1598910576664.png

In the Query editor select (with Ctrl) two columns and click unpivot Columns and that's it. Apply changes and do next steps.

lkalawski_1-1598910671543.png



_______________
If I helped, please accept the solution and give kudos! 😀

 

 

Thanks again! This is exactly the help I needed

Thanks! This will work. 

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.