Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, I am new to power bi. I am facing a problem. I want to create a new column as "Highest Target Quantity" which shows for Jan 1st Highest Target Quantity achieved as 2 and for Jan 2 Highest Target Quantity achieved as 3, based on the Max Count column.
Solved! Go to Solution.
Hi @Anonymous,
One sample for your reference. Here we can create two measures as below to get the result as we need.
MAX = CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[DATE]),VALUES(Table1[ITEM]))
MAXX = MAXX(Table1,[MAX])
For more details, please check the pbix as attached.
Regards,
Frank
Hi @Anonymous,
To create another new measure and make the table visual filterd by the measure.
Measure = var result = MAXX(ALLEXCEPT(Table1,Table1[DATE]),[MAXX]) return IF([MAX]=result,1,0)
Regards,
Frank
Hi,
Try this calculated column formula
=CALCULATE(MAX(Data[Max Count]),FILTER(Data,Data[Month]=EARLIER(Data[Month])&&Data[Day]=EARLIER(Data[Day])))
Hope this helps.
If you include Month and Day in your visual then you should just need a measure that is essentially:
Measure = MAX([Max COUNT])
Hello Greg, thank you for your time to reply to my issue. But I think I dint explain the problem clearly. The image attached is the file which needed to be solved. In the final output colum I want to get the Maximum Count for each date. Example : For Jan1 its team 3 with 2 count and for Jan 2 its team 2 with 3 count. If I use = Max([Count]) , it gives the output in visualization as 1 for all rows.
So I want the final output as Jan 1 Highest count as 2 and for Jan 2 as 3.
Hi @Anonymous,
One sample for your reference. Here we can create two measures as below to get the result as we need.
MAX = CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[DATE]),VALUES(Table1[ITEM]))
MAXX = MAXX(Table1,[MAX])
For more details, please check the pbix as attached.
Regards,
Frank
Hello v-frfei-msft,
First of all I would like to thank you for helping me out. Yes you're solution worked 90% 🙂 . Can you please also let me know how you can add the Item in the visualization. Example : In the Final output visulaization I want to see as "Jan 1 ->The maximum output was 2 and it was produced by Item 3 and for Jan 2 -> The maximum output was 3 and it was produced by Item 2.
Date Item Maxx
=> Jan 1 -> 3 -> 2
=> Jan 2 -> 2 -> 3
Hi @Anonymous,
To create another new measure and make the table visual filterd by the measure.
Measure = var result = MAXX(ALLEXCEPT(Table1,Table1[DATE]),[MAXX]) return IF([MAX]=result,1,0)
Regards,
Frank
@Anonymous
Do you want to create a measure or column?
If you want to create a measure
maxcount = MAX(Table5[count])
if you want to create a column
maxcount2 = MAXX(FILTER(Table5,'Table5'[date]=EARLIER(Table5[date])),Table5[count])
1
Proud to be a Super User!
Hello Ryan,
Thank you for your time to reply to my issue. I would like to know how you created the "count" column? It looks like a summarized table ,compared to my Count column which has only "1" in all the row values.
@Anonymous
I just create a new column. I also attached the DAX. You can have a try on your end. Thnaks
maxcount2 = MAXX(FILTER(Table5,'Table5'[date]=EARLIER(Table5[date])),Table5[count])
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |