Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all,
I have a measure where I return the name of a fleet whenever a customer or a fleet is selected in a slicer (otherwise blank is returned), like:
Hi,
Use the CONCATENATEX() function. If it does not help, then share some data and show the expected result.
Hi!
It's a possibility, although I would like to get different measures for every fleet, so I could visualize them on top of each other, like:
Makes sense?
Thanks for your reply 🙂
Hi @Victormar,
In fact, max function not only work from get the maximum value from table, but it will also dynamic change based on current row context.
You need to add a category/group field to help this formula calculate based on current row context. (for card visual, the row context which measure processed should be match with table level)
Row Context and Filter Context in DAX - SQLBI
Regards,
Xiaoxin Sheng
HI @Victormar,
I think ISFILTERED and HASONEVALUE functions should more suitable for your requirement, you can try to use the following measure formula if helps:
formula =
IF (
ISFILTERED ( DIM_Chassis[FLEET_FLEET_ID] )
|| ISFILTERED ( DIM_Chassis[CONTRACT_CUSTOMER_NAME] ),
IF (
HASONEVALUE ( DIM_Chassis[FLEET_FLEET_ID] ),
MAX ( DIM_Chassis[FLEET_FLEET_ID] )
)
)
Regards,
Xiaoxin Sheng
The problem is that this one would only return the max, and I would like to return a specific position of a fleet. Say the Customer has two fleets, I would like to create different measures for every fleet related to the customer, so perhaps the first measure would return the first fleet, the second the 2nd... and so on...
The tricky part is how to tell the measure which position of the fleet to return, if that makes sense? Maybe with a rank or an index?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |