cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
esemyashkin
Helper I
Helper I

Show only two colors on chart

I have a table that contains fields: company name, sales, date, rating. And a time table to her. There is also a time slicer that sets the beginning and end of the period.
I want to show on the chart the rating in comparison for two periods (the beginning and the end from the slicer). However, if I change the borders of the slaser, then the "color" of one of the columns is automatically changed. I want the two colors to stay the same (eg blue and green) no matter how the slicer moves.
Can someone tell / show how to do this?
Attached a file with an example.https://1drv.ms/u/s!AkdBRPknhBwvgqhZvHcgtU7aSoLzcA?e=PedTjV 

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

Hi @esemyashkin ,

 

Create two measures for min date and max date.

min_ = CALCULATE(SUM('table'[Sales]),FILTER('table','table'[Date]=MIN('Date Table'[Date])))

max_ = CALCULATE(SUM('table'[Sales]),FILTER('table','table'[Date]=MAX('Date Table'[Date])))

 Then create a visual as below.

10.PNG

 

Best Regards,

Jay

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

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @esemyashkin ,

 

Create two measures for min date and max date.

min_ = CALCULATE(SUM('table'[Sales]),FILTER('table','table'[Date]=MIN('Date Table'[Date])))

max_ = CALCULATE(SUM('table'[Sales]),FILTER('table','table'[Date]=MAX('Date Table'[Date])))

 Then create a visual as below.

10.PNG

 

Best Regards,

Jay

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

View solution in original post

Thanks it that i need.

But in this case if dont have date in table1 ( that in slicer of date table), then it is not shown on chart.  Can measure take nearly date ?

( For example if in slicer period( from 01.03.2021 to 10.03.2021),and in table  in 03.2021  is near date 02.03.2021, than it show on chart: 02.03.2021 and 10.03.2021.

Any idea?

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Kudoed Authors