Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
62 | |
46 | |
45 |