Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
19 | |
18 | |
18 | |
15 |
User | Count |
---|---|
39 | |
22 | |
18 | |
15 | |
12 |