cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pran_jal Frequent Visitor
Frequent Visitor

Two different dates slicing single visualisation

Hi ,

I have a table as shown in the screenshot . 
Then it should compare the sum of the amount for each purchase element for each date that we select in the slicer.
Let the two compare measures be Compare 1 and Compare 2. So the requirement is that when I choose a date in slicer one and a Type in costing type slicer one
it should affect data in compare one . and when I choose the date and type in slicer two it should affect the sum in comparing 2.
For example :

If I choose 28th April 2019 and Type 1 in slicer 1 and 29th April 2019 and Type 3 in slicer two than it should show ,

sum of the amount of Type 1 on 28th april Vs sum of the amount of type 3 on 29th April n the same visualisations. Currently, if I am using two different dates or two different types it shows be blank data.


table.PNGsample table data

 

visual.PNGsample visualisation

 blank visual.PNGblank visual if two dates are choosen

Any idea will be welcome. Please tell if the requirement is clear. 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Two different dates slicing single visualisation

Hi @pran_jal 

I can create two measure to show values of comparing 1 and comparing 2.

First, create two tables

filte1 = CROSSJOIN(VALUES('Table'[type]),VALUES('Table'[date]))

filter2 = CROSSJOIN(VALUES('Table'[type]),VALUES('Table'[date]))

They have no relationship with others.

 

Then add "date" and "type" from two tables in slicers.

 

Create measures

compare1 = CALCULATE(SUM('Table'[amount]),FILTER(ALLEXCEPT('Table','Table'[item]),'Table'[type]=SELECTEDVALUE('filte1'[type])&&'Table'[date]=SELECTEDVALUE(filte1[date])))

compare2 = CALCULATE(SUM('Table'[amount]),FILTER(ALLEXCEPT('Table','Table'[item]),'Table'[type]=SELECTEDVALUE('filter2'[type])&&'Table'[date]=SELECTEDVALUE(filter2[date])))

Capture9.JPG

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

2 REPLIES 2
vivran22 Member
Member

Re: Two different dates slicing single visualisation

@pran_jal 

 

Hi,

 

Is your requirement to compare the total costing for two different date ranges?

 

Rgds,

Vivek

Community Support Team
Community Support Team

Re: Two different dates slicing single visualisation

Hi @pran_jal 

I can create two measure to show values of comparing 1 and comparing 2.

First, create two tables

filte1 = CROSSJOIN(VALUES('Table'[type]),VALUES('Table'[date]))

filter2 = CROSSJOIN(VALUES('Table'[type]),VALUES('Table'[date]))

They have no relationship with others.

 

Then add "date" and "type" from two tables in slicers.

 

Create measures

compare1 = CALCULATE(SUM('Table'[amount]),FILTER(ALLEXCEPT('Table','Table'[item]),'Table'[type]=SELECTEDVALUE('filte1'[type])&&'Table'[date]=SELECTEDVALUE(filte1[date])))

compare2 = CALCULATE(SUM('Table'[amount]),FILTER(ALLEXCEPT('Table','Table'[item]),'Table'[type]=SELECTEDVALUE('filter2'[type])&&'Table'[date]=SELECTEDVALUE(filter2[date])))

Capture9.JPG

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 309 members 3,566 guests
Please welcome our newest community members: