Forum Discussion
Lowest Value Name
- 5 years ago
Hi abartozzi,
Depending on your data structure, calculating the field name corresponding to the maximum value in different fields is not supported, perhaps you can change the data structure to unpivot 'AVES', 'Bookling.com', 'Agoda.com', etc. into one column as follows.
Then try measure as:
Measure 2 = IF( [Measure]=MAXX(FILTER(ALL('test table'),'test table'[Category]=MAX('test table'[Category])),[Measure]), MAX('test table'[Subcategory]), BLANK() )I added this into the demo, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi v-xulin-mstf
imagine another table where you have a "rate" column where it shows the min value of all columns (Expedia, Findhotels, etc) and another column next to it called "OTA" that shows the website selling it
E.g in the chart i gave you Sunday Aug 22nd you have Maison Fleurie Record where Edreams is the cheapest value hence the measure should do:
| Hotel | Rate | OTA |
| Maison Fleurie | 132 | Edreams |
Where the table is a pivot (like the one i gave) where colums are on a first stage the date and following the example i gave you. In detail
- the hotel: comes straight from the database
- Rate: is a calculated column that picks the min of other columns (rates of: expedia, findhotels, etc)
- OTA: is the measure that explicts the name of the min column of Rate
hope it clarifies
Hi abartozzi,
Try measure as:
Measure=
if(
[Rate]=Minx(filter(all'table','table'[hotel]=max('table'[hotel])),[Rate]),
max('table'[OTAs]),
blank()
)
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
- abartozzi5 years agoFrequent Visitor
Hi v-xulin-mstf
I gave it a crack but didn't work out. I enclosed a copy of the report here
https://drive.google.com/file/d/1SZ6yfXjlU8sKOSe-FKHm7ZTgQaqvwutT/view?usp=sharing
there is no much sensitive information so you can play around. have a look and let me know
- v-xulin-mstf5 years agoCommunity Support
Hi abartozzi,
Depending on your data structure, calculating the field name corresponding to the maximum value in different fields is not supported, perhaps you can change the data structure to unpivot 'AVES', 'Bookling.com', 'Agoda.com', etc. into one column as follows.
Then try measure as:
Measure 2 = IF( [Measure]=MAXX(FILTER(ALL('test table'),'test table'[Category]=MAX('test table'[Category])),[Measure]), MAX('test table'[Subcategory]), BLANK() )I added this into the demo, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!