minimum
3 TopicsDAX Filter
Hello, I am making a Price Volume Mix in PowerBI, but after review I need to fix my values for Total Volume. I have made this PVM Dynamic by allowing the user to select two years. I set those years as Min and Max. My table counts the volume of a product line for the minimum and maximum years selected perfectly fine, but I cant get the total volume of all productlines for each manufacturer of the seleted year. I could be overcomplicating it, but not sure. My first DAX VolumeYearMin for product line looks like this, and displays correct values. VolumeYearMin = VAR YearMin = YEAR(MIN(CalendarTable[Date])) RETURN CALCULATE( SUM(Table1[QUANTITY_SHIPPED]), Table1[Year] = YearMin ) My second dax where I want to grab all the manufacturer's volume for that product line runs of that yea. Displays the exact value of my first dax. SumVolumeMin = VAR YearMin = YEAR(MIN(CalendarTable[Date])) RETURN CALCULATE( SUMX( FILTER( Table1, Table1[MANUFACTURER] = SELECTEDVALUE(Table1[MANUFACTURER]) && YEAR(Table1[INVOICE_DATE]) = YearMin ), Table1[QUANTITY_SHIPPED] ) Any Suggestions?489Views0likes1CommentWanted to extract the individual components in side the category
I want my data to look like this. I can see the total values for all the Ingredient text. I am using this measure to extract the ingredient text. But when I apply this measure, I can see the total values only for Ingredient 1 text and not for others. And when I use this measure as a tooltip, it is not working. Only ingredient 1 text is working Only ingredient 1 total value comes on the column and only that is working when used as a tooltip. Rest of the 3 ingredients shows a blank text. I am working on this as part of Week 35, 2021 #WorkoutWednesday https://workout-wednesday.com/pbi-2021-w35/ Kindly help me outSolved450Views0likes1CommentHelp with DAX for Scaled Score Matrix
Hi all, I've been trying to create a DAX measure to generate scaled score (wihout intermediate tables) for a competition but unsuccessful. This is how the end matrix is required in Power BI Scaled Score Team 1 Team 2 Team 3 Cooking 1 0 0.70 Driving 1 0.93 0 Reading 0 1 0.53 Singing 1 0 0 Sports 1 0.36 0 The forumula that is used to calcuate the scaled score: Scaled Score for an Activity = ((Sum of the respective Team's Activity Mins) - (Minimum of Activity Mins across teams)) / ((Maximum of Activity Mins across teams) - (Minimum of Activity Mins across teams)) For e.g., Scaled Score of Team 3 for Cooking = (150-20)/(205-20) = 0.703 This is the source table, named Activity: This table contains the list of activities (with duration in mins) perfomed by each candidate. Team Candidate Name Activity Activity Mins Team 1 Man 1 Singing 90 Team 3 Man 1 Singing 35 Team 2 Man 4 Driving 30 Team 3 Man 2 Reading 80 Team 3 Man 4 Cooking 30 Team 1 Man 2 Reading 65 Team 1 Man 5 Cooking 85 Team 3 Man 5 Cooking 15 Team 1 Man 1 Sports 85 Team 1 Man 4 Sports 75 Team 1 Man 5 Driving 30 Team 2 Man 4 Sports 65 Team 2 Man 3 Sports 25 Team 2 Man 3 Reading 20 Team 1 Man 4 Sports 35 Team 1 Man 3 Singing 75 Team 2 Man 4 Singing 35 Team 3 Man 2 Reading 35 Team 3 Man 4 Driving 30 Team 3 Man 3 Sports 30 Team 2 Man 1 Driving 70 Team 1 Man 4 Driving 75 Team 1 Man 5 Cooking 85 Team 1 Man 5 Cooking 35 Team 3 Man 5 Cooking 50 Team 2 Man 3 Cooking 20 Team 3 Man 5 Cooking 55 Team 2 Man 2 Reading 75 Team 2 Man 3 Reading 65 Team 1 Man 3 Singing 75 This is the measure I wrote after a lot of research, but it isn't working as intended Scaled Score = VAR MinValue = CALCULATE( MINX( SUMMARIZE(Activity, Activity[Team]), CALCULATE( SUM(Activity[Activity Mins]) ) ) ) VAR MaxValue = CALCULATE( MAXX( SUMMARIZE(Activity, Activity[Team]), CALCULATE( SUM(Activity[Activity Mins]) ) ) ) VAR TeamTotal = CALCULATE( SUM(Activity[Activity Mins]), ALLEXCEPT(Activity, Activity[Activity]) ) RETURN DIVIDE(TeamTotal - MinValue, MaxValue - MinValue, 0) Any help in getting the DAX measure is appreciated. Thanks in advance!Solved860Views0likes2Comments