Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!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.
Hi Team,
Power bi Data Source
Date | StockName | Name | Value |
7/19/2024 | Relience | EPS | 10.67 |
7/19/2024 | Relience | GPS | 11.36 |
7/19/2024 | Relience | RPS | 12.05 |
7/19/2024 | Relience | NPS | 12.74 |
7/19/2024 | Relience | BPS | 13.43 |
7/19/2024 | Medico | EPS | 10.67 |
7/19/2024 | Medico | GPS | 7.91 |
7/19/2024 | Medico | RPS | 5.15 |
7/19/2024 | Medico | NPS | 2.39 |
7/19/2024 | Medico | BPS | 13.43 |
7/19/2024 | BPO | EPS | 24.47 |
7/19/2024 | BPO | GPS | 35.51 |
7/19/2024 | BPO | RPS | 46.55 |
7/19/2024 | BPO | NPS | 57.59 |
7/19/2024 | BPO | BPS | 68.63 |
7/18/2024 | Relience | EPS | 8.9 |
7/18/2024 | Relience | GPS | 11.36 |
7/18/2024 | Relience | RPS | 13.82 |
7/18/2024 | Relience | NPS | 16.28 |
7/18/2024 | Relience | BPS | 18.74 |
7/18/2024 | Medico | EPS | 21.2 |
7/18/2024 | Medico | GPS | 23.66 |
7/18/2024 | Medico | RPS | 26.12 |
7/18/2024 | Medico | NPS | 28.58 |
7/18/2024 | Medico | BPS | 31.04 |
7/18/2024 | BPO | EPS | 33.5 |
7/18/2024 | BPO | GPS | 35.96 |
7/18/2024 | BPO | RPS | 38.42 |
7/18/2024 | BPO | NPS | 40.88 |
7/18/2024 | BPO | BPS | 43.34 |
i have a stock name as in the slicer
and in the line graph i have put
xaxis-Date
yaxis-Value
Legent-StockName
requirement
when we select first stock from the slicer then it should give marun colur in the line chart and when i select more than one stock then it sould give me grey colur to the second stock , basically user willl select only two stocks most of the times becuase he just need to do comparision between two stocks
and the same color should apply to table matrix it means in the column will give the same color as in the line chart
rows-Name
Columns-StockName
Values-RecentValue
RecentValue =
VAR SelectedTradeDate = SELECTEDVALUE(DASCaptured[Date])
VAR SelectedInstrument = SELECTEDVALUE(DASCaptured[StockName])
VAR SelectedName = SELECTEDVALUE(DASCaptured[Name])
VAR MaxDate =
CALCULATE(
MAX(DASCaptured[Date]),
FILTER(
ALL(DASCaptured),
DASCaptured[Date] <= SelectedTradeDate &&
DASCaptured[StockName] = SelectedInstrument &&
DASCaptured[Name] = SelectedName
)
)
RETURN
CALCULATE(
MAX(DASCaptured[CValue]),
FILTER(
ALL(DASCaptured),
DASCaptured[Date] = MaxDate &&
DASCaptured[StockName] = SelectedInstrument &&
DASCaptured[Name] = SelectedName
)
)
Thanks
@anshenterprice , As of now we can not control the color of line based on conditions. It can not change based on the measure.
@amitchandak is there any other solution ? becuase we have three visual in the page
1 TableMatrix and two line chart
when we select two stocks from the slicer then it should give the same color for tablematrix and the other two line charts everytime
User | Count |
---|---|
77 | |
70 | |
69 | |
54 | |
48 |
User | Count |
---|---|
42 | |
37 | |
34 | |
31 | |
28 |