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
Hello everyone and thank you in Advance. I am still fairly new to DAX and starting to get the grasp of it. I am still having a problem trying to use the Min and Max commands (I tried MIN, MINA, MINX, etc) when applying the forumla on a measure. I believe I need to use MINX and MAXX since it refers to a measure. I might need to make these measure in the table I am referencing the measure too (I had to do this for RANKX to work) but Im honestly not sure as I have tried that as well. Here is my syntax:
Here are results with the above formula
Again, thanks in advance!!
Solved! Go to Solution.
@james_pease
Please try
Food Cost Max =
MAXX (
CALCULATETABLE (
VALUES ( ChartOfAcounts[Store_ID] ),
'ChartOfAccounts'[Category] = "Food Cost"
),
CALCULATE ( [Cost %], 'ChartOfAccounts'[Category] = "Food Cost" )
)
Also, I am using a data slicer to filter the 5 companies separetly. So I am looking to pull the outliers for each company separetly. So I will be making 5 separate visualizations or 1 visualizations but have the min and max be categorized by each company. I think that is a simple filter(company name that I can add to the mins and maxs formulas.
Category is a Column from a table named 'ChartOfAccounts'
@james_pease
Please try
Food Cost Max =
MAXX (
CALCULATETABLE (
VALUES ( ChartOfAcounts[Store_ID] ),
'ChartOfAccounts'[Category] = "Food Cost"
),
CALCULATE ( [Cost %], 'ChartOfAccounts'[Category] = "Food Cost" )
)
Thank you so much! I only had to modify the Store ID section (we have stores in a different table) but worked like a charm! Thanks again! Now I can replicate the formula for the other cost measures and add a filter clause to ensure each company is being calculated separately.
Sorry, should have clarified, yes each dot represents a store. So we graphed them with cost % on the y axis and revenue on the x axis. I know that it should be flipped as revenus is the dependant variable but thats how the company wanted it graphed.
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 |
---|---|
26 | |
20 | |
19 | |
14 | |
13 |
User | Count |
---|---|
44 | |
36 | |
24 | |
24 | |
22 |