Forum Discussion
afbraga66
5 years agoHelper III
Sort Matrix by dynamic column value based on filters
Hi, I have a requirement to sort a matrix by the last possible month value, 7 in the example below. The issue is that Power BI only sorts by the total and that is not what I want. I ...
Greg_Deckler
5 years agoCommunity Champion
afbraga66 Perhaps:
Today Month =
VAR __Date = MAX('DOWNTIME'[DIA_FABRIL])
RETURN
IF(ISBLANK([mDuration (min)],
BLANK(),
CALCULATE([mDuration(min)], KEEPFILTERS(DOWNTIME[MES_FABRIL]=MONTH(__Date)))
)afbraga66
5 years agoHelper III
Hey Greg_Deckler ,
I have tried it, but it is not working. Still giving the same result as the previous one unfortunately.
Probably because the ISBLANK() evaluates against the values of all months in that expression?
Thank you.
- Greg_Deckler5 years agoCommunity Champion
afbraga66 What about this version?
Today Month = VAR __Date = MAX('DOWNTIME'[DIA_FABRIL]) VAR __mDuration = CALCULATE([mDuration(min)],KEEPFILTERS(DOWNTIME[MES_FABRIL]=MONTH(__Date))) RETURN IF(ISBLANK(__mDuration), BLANK(), __mDuration )- afbraga665 years agoHelper III
- afbraga665 years agoHelper III
Hey Greg_Deckler ,
Sorry to bother but any news on this topic?