Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I'd like to do a visual showing only Top (N) using multiples columns.
dates | Col1 | col2 | col3 | col4 | Wanted Result in visual | |
2023-04-20 | 25 | 20 | 15 | 45 | col1 :25; col4: 45 | |
2023-04-21 | 12 | 35 | 10 | 34 | col4: 34; col2: 35 | |
2023-04-22 | 45 | 22 | 36 | 48 | 45;48 | |
2023-04-23 | 12 | 47 | 31 | 14 | 47;31 | |
2023-04-24 | 56 | 20 | 33 | 12 | 56;33 |
I'm using the filter but I can just choose one column not all others :
Do you have idea how to do it ?
Thanks
Nissa
Solved! Go to Solution.
Hi @Nissa23 ,
Please try:
First Unpivot your data:
Output:
Then apply the measure:
TOPN_Value =
var _a = TOPN(2,FILTER(ALL('Table'),'Table'[dates]=SELECTEDVALUE('Table'[dates])),[Value],DESC)
return IF(SELECTEDVALUE('Table'[Attribute]) in SELECTCOLUMNS(_a,"Attribute",[Attribute]),SUM('Table'[Value]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Nissa23 ,
Please try:
First Unpivot your data:
Output:
Then apply the measure:
TOPN_Value =
var _a = TOPN(2,FILTER(ALL('Table'),'Table'[dates]=SELECTEDVALUE('Table'[dates])),[Value],DESC)
return IF(SELECTEDVALUE('Table'[Attribute]) in SELECTCOLUMNS(_a,"Attribute",[Attribute]),SUM('Table'[Value]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
67 | |
61 | |
47 | |
34 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |