Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
yudhi
Regular Visitor

Sorting calculted measure with condition

Dear all

 

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

 

2.png

 

 

 

 

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 2
v-ljerr-msft
Employee
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 uploadingSmiley Happy

 

Regards

Hi v-ljerr-msft

 

Below as the link of data and solution

 

https://www.dropbox.com/s/ji1lcsx1n3coa7s/Share%20PowerBI.7z?dl=0

 

Many thanks for Help

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.