Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I am working only with one table, and I want, in the same bar chart, have different columns filtering the data by different ways, defined by rankings (explained further on).
For that reason, I have created many inputs for the user to insert it's preferences for each ranking. For the sake of the explanation, I will limit this as vRanking1Station, vRanking1OpenDuration, and vRanking1Name.
In that case, I will be separating each bar into rankings:
For example, the first bar will be named Ranking1, and I want the sum of the price, if my station is equal to the variable, the open duration and so on. So, in theory I would have to do something like:
=Sum({<station={$'vRanking1Station'}>,<openDuration={$'vRanking1OpenDuration'}>,<name={$'vRanking1Name'}> price)
My problem is: for each station, I have more than one name. Initially, my data has a column "names", which I concatenated the names (Ex: "Bob; Arthur; Juliette").
How can I do something like name includes vRanking1Name?
Hi @Victor_ ,
Instead of using separate set analysis expressions for each variable, you can create a single expression that dynamically filters based on the user's input. Below is an example expression that combines the filters for vRanking1Station, vRanking1OpenDuration, and vRanking1Name:
=Sum({<station={"$(vRanking1Station)"}, openDuration={"$(vRanking1OpenDuration)"}, name*= {"*$(vRanking1Name)*"}>} price)
Wildcard (*) is used with the 'contains' logic to filter names that include the vRanking1Name variable.
**********Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.********
Hi @Victor_ ,
Instead of using separate set analysis expressions for each variable, you can create a single expression that dynamically filters based on the user's input. Below is an example expression that combines the filters for vRanking1Station, vRanking1OpenDuration, and vRanking1Name:
=Sum({<station={"$(vRanking1Station)"}, openDuration={"$(vRanking1OpenDuration)"}, name*= {"*$(vRanking1Name)*"}>} price)
Wildcard (*) is used with the 'contains' logic to filter names that include the vRanking1Name variable.
**********Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.********