Forum Discussion
Return Graph
- 5 years ago
Hi Anonymous ,
If you are using measures on your values you are not abble to get the result you need simply with the use of this measures and the year column.
Create a new table with all your measure names and and ID column something similar to:
ID MeasureName 1 Measure1 2 Measure2 ... ... 10 Measure10 Now create the following measure:
Selection = SWITCH ( SELECTEDVALUE ( Table[MeasureName] ), 1, [Measure1], 2, [Measure2], ..., ... 10, [Measure10] )Now make your line chart with the following setup:
- Axis: MeasureName (Column)
- Legend: Year (Column)
- Values: Selection (Measure)
Should return expected values
Hi Anonymous ,
If you are using measures on your values you are not abble to get the result you need simply with the use of this measures and the year column.
Create a new table with all your measure names and and ID column something similar to:
| ID | MeasureName |
| 1 | Measure1 |
| 2 | Measure2 |
| ... | ... |
| 10 | Measure10 |
Now create the following measure:
Selection =
SWITCH (
SELECTEDVALUE ( Table[MeasureName] ),
1, [Measure1],
2, [Measure2],
..., ...
10, [Measure10]
)
Now make your line chart with the following setup:
- Axis: MeasureName (Column)
- Legend: Year (Column)
- Values: Selection (Measure)
Should return expected values
- Anonymous5 years agoNot applicable
MFelix Thank you, I tried it but I can't put Year in the legend because is not in the same table so they ask me to manage the relashionship between the two tables. And I can't do it because it's doesn't exist any.
Have you have some idea?
Thank you
- MFelix5 years agoSuper User
Can you share a sample of your data model, and how the measures are calculated?
- Anonymous5 years agoNot applicableMFelix Yes sure, Thank youmy measures are like thisM1 = COUNTX(FILTER('Table',Table[Date2]=EDATE(Table[Date1],1)), Table[Date2])M2 is the same except I have EDATE(Table[Date1],2)M3 with EDATE(Table[Date1],3)....With my following excel:https://www.dropbox.com/scl/fi/yl9ermmkv0vcnf393reie/Book1.xlsx?dl=0&rlkey=isrptj2zdg2mii39odsmjih9lThank youHave a nice day