March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I would like to write a measure based on my other measure, my data sample is as follows:
Score table :
and a factor table:
Both tables are related to a key table:
I have a measure in my Score table which calculates the minimum across all 'key' , with my 'batch' on a slicer
The measure is a simple min function: MIN(Score[score])
I want to calculate the [rate]*[factor] only for minimum scores. Is there a way or formula to do this calculation? Please let me know.
@k123 If I understand correctly, you want to find out min for a batch from first table. For example: For Batch 123, the minimum is 1(b1). Using this minimum for the batch 123(b1). You want to calculate the rate * factor for b1 only for Batch 123.
@Anonymous yes thats right
Use the below calculation to find the columns which have the min value.
IsMinScore = VAR MinForBatch = CALCULATE(MIN('Score Table'[Score]),ALLEXCEPT('Score Table','Score Table'[Batch])) RETURN IF('Score Table'[Score]=MinForBatch,'Score Table'[Score],0)
I am finding the min for every batch using ALLEXCEPT. and then comparing them to the score table. If it is then you can calculate the product, if not then output 0.
@Anonymous thanks for quick response, however I am not able to calculate the product inside the IF statement, since my product consists of two columns: 'factor' and 'rate', I want to multiply both these columns based on my minimum score
@Anonymous , actually my measure MIN, calculates the minimum score across all keys and for the selected batch on the slicer; so once I get the min score for each keys in a batch, I want to multiply the rate corresponding that minimum score with the factor. I hope I was able to clarify. Thanks
You may use LOOKUPVALUE Function to add a calculated column first.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
204 | |
105 | |
99 | |
64 | |
54 |