Forum Discussion

yudhi's avatar
yudhi
Regular Visitor
8 years ago

Sorting calculted measure with condition

Dear all

 

I have problem to sort value in chart (Top 10), with calculated measure 

 

 

 

 

 

Measure "MMonth-NPL>90" is calculated with condition to filter Year and Month Filter. 

Year and Month Filter is use for first chart (above) to show trend 4 month latest and second chart to show current (as year month Parameter)

 

 

MMonth-NPL>90:=var Ldate = EOMONTH(date(max(Year[Year]),max(Month[Month]),1),0) //Last date

var Fdate = date(max(Year[Year]),max(Month[Month]),1)
var Unit= FactNPL[M-NPL>90] //Calculation

return

if(MIN(DimTime[Date])<fdate,
blank(),
if(MAX(DimTime[Date])>Ldate,
blank(),
Unit))

 

And  Measure "[M-NPL>90]"  also calculated measure to filter amount of [M-NPL>90] is Unit or Amount from fact table

 

M-NPL>90:= var Unit =1 var Amount =2  Return IF (MIN(DimMeasure[MeasureID])=Unit,sum(FactNPL[NPL>90Unit]),sum(FactNPL[NPL>90Amount]))

 

 

 

The sorting function in chart is not working for measure selected (Chart 2)

 

Thanks

Yudhi H

2 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi yudhi,

     

    Could you share a sample pbix file(with just some mock data) which can reproduce the issue, so that we can better assist on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. :smileyhappy:

     

    Regards