Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all, I am wanting to sum the minimum in each ID per month.
If there are duplicate minimum values in the same ID , I want to ignore all other duplicate minimum values except the most recent minimum value.
Here's what my data looks like and what I want to see below.
Solved! Go to Solution.
@Anon29 , Add a month year column and measures like
Last Qty = Var _max = Minx(filter( ALLSELECTED(Data1), Data1[ID] = max(Data1[ID]) && Data1[Month] = max(Data1[Month]) ),Data1[Value])
return
CALCULATE(sum(Data1[qty]), filter( (Data1), Data1[ID] = max(Data1[ID]) && Data1[Value] =_max))
Sum Last Qty = sumx(Summarize(Data1, Data1[ID], Data1[Month Year]) , [Last Qty])
Month year column = format([Date], "YYYYMM")
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Need to create two calculated columns:
Month = MONTH([Date])
Rx = RANKX(FILTER('Table',[ID]=EARLIER('Table'[ID])&&'Table'[Month]=EARLIER('Table'[Month])),[Date],,ASC)
Also two measures
Count = CALCULATE(COUNTROWS(),'Table'[Month]=MAX('Table'[Month]),REMOVEFILTERS('Table'[Date]))
Sample PBIX file attached
https://dropmefiles.com/Kdo3y
Need to create two calculated columns:
Month = MONTH([Date])
Rx = RANKX(FILTER('Table',[ID]=EARLIER('Table'[ID])&&'Table'[Month]=EARLIER('Table'[Month])),[Date],,ASC)
Also two measures
Count = CALCULATE(COUNTROWS(),'Table'[Month]=MAX('Table'[Month]),REMOVEFILTERS('Table'[Date]))
Sample PBIX file attached
https://dropmefiles.com/Kdo3y
Hi @amitchandak , It looks like it is summing all the minimum duplicate numbers per ID. I want to record only 1 of the minimum per month for each category and then sum by that. So for ID A in Jan, there are two minimum values of "2", I only want to record this as being just one "2" and disregard the other one.
This is what came up
But I was wanting it to show this
@Anon29 , Add a month year column and measures like
Last Qty = Var _max = Minx(filter( ALLSELECTED(Data1), Data1[ID] = max(Data1[ID]) && Data1[Month] = max(Data1[Month]) ),Data1[Value])
return
CALCULATE(sum(Data1[qty]), filter( (Data1), Data1[ID] = max(Data1[ID]) && Data1[Value] =_max))
Sum Last Qty = sumx(Summarize(Data1, Data1[ID], Data1[Month Year]) , [Last Qty])
Month year column = format([Date], "YYYYMM")
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0