Forum Discussion
How add moving horizontal line in graph?
Hi,
I want to have certain periods of time marked in my chart based on certain events happening during a certain period. I have data from various countries and amount of tourists per month. I want to show whether a decline in tourism can be explained by a certain event in that period. A country can have multiple events. I tried to accomplish this by adding the following measure to my graph:
Hi Anonymous ,
"What I need is : IF('Tourism'[Year]) = Event[Year]); 10; blank(), showing multiple horizontal lines based on the events a country had. "
You can do like this:
// Creaet column in Tourism table Column = VAR x = LOOKUPVALUE( Event[Year], Event[Year], Tourism[Year] ) RETURN IF( [Year] = x, 10, BLANK() )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- amitchandak
Super User
Anonymous , difficult to say without data. Please explain with an example
Can you share sample data and sample output.
- v-lionel-msft
Community Support
Hi Anonymous ,
"What I need is : IF('Tourism'[Year]) = Event[Year]); 10; blank(), showing multiple horizontal lines based on the events a country had. "
You can do like this:
// Creaet column in Tourism table Column = VAR x = LOOKUPVALUE( Event[Year], Event[Year], Tourism[Year] ) RETURN IF( [Year] = x, 10, BLANK() )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-lionel-msft
Community Support
Hi Anonymous ,
Has your problem been solved?
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
yes, thank you!!
- AnonymousNot applicable
yes thank you!