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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sman
Frequent Visitor

Creating side-by-side view of table data given two dates

Hello!

 

Given a table like this 

valid_fromvalid_toarticleprice
2022-01-052022-01-15A200
2022-01-162022-03-17A300
2022-03-18 A350
2022-01-082022-01-15B30
2022-01-162022-03-23B40
2022-03-14 B35

 

 

 

I want to create a visualization which let's the user select two dates t_1 and t_2 and display the active prices next to each other. So for example if the user select t_1 = '2022-02-01' and t_2 = '2022-04-01' then the resulting table should be displayed:

articlet1_valid_fromt1_valid_tot1_pricet2_valid_fromt2_valid_tot2_price
A2022-01-162022-03-173002022-03-18 350
B2022-01-162022-03-23402022-03-14 35

 

 

 

I've played around with this problem in PowerBI and the closest I've gotten is creating two slicers (one of type above and one of type below) and then classifying rows in the original table as either being irrelevant, matching t1 or matching t2. But that's about it. Does anyone know any other way in which I should approach this problem?

4 REPLIES 4
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

sman
Frequent Visitor

I've updated the post - thanks for feedback.

Your approach should work.  However I would be concerned that the layout may be confusing to your users. What is the relationship between these two date slicers?  What if the user picks and earlier date for T2 and a later date for T1?

 

A timeline chart may be a better answer.

lbendlin_0-1682347482014.png

 

 

sman
Frequent Visitor

That's not quite what I want to do! I want to display prices of the same article side by side (see my OP).

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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