cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Impactful Individual
Impactful Individual

How to compute Aging Day to 1 to 30 Day 31 to 60 Day ?

2 ACCEPTED SOLUTIONS
Responsive Resident
Responsive Resident

@Paulyeo11  use the following DAX

 

Agein Bucket = SWITCH(TRUE(),

AND(Query1[AGING]>0,Query1[AGING]<=30),"1-30 Days",

AND(Query1[AGING]>30,Query1[AGING]<=60),"31-60 Days",

AND(Query1[AGING]>60,Query1[AGING]<=90),"61-90 Days",

AND(Query1[AGING]>90,Query1[AGING]<=120),"91-120 Days",

AND(Query1[AGING]>120,Query1[AGING]<=150),"121-150 Days",

AND(Query1[AGING]>150,Query1[AGING]<=180),"151-180 Days",BLANK())

Here is the required resultcommunity.png

Appreciate a Kudos if this resolves your Query !!

View solution in original post

Community Support
Community Support

Hi, @Paulyeo11 

According to your description, you want to make the value of measure[AGING] displays Split date counts, you can try this measure to replace your current measure:

AGING =

var _datediff=Datediff([AR Invoice Date],today(),day)

return

SWITCH(

    TRUE(),

    _datediff<=30,"1 to 30 Day",

    _datediff<=60,"31 to 60 Day",

    "Over 60 day"

)

And you can get what you want, like this:

v-robertq-msft_0-1605598760412.png

 

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support
Community Support

Hi, @Paulyeo11 

According to your description, you want to make the value of measure[AGING] displays Split date counts, you can try this measure to replace your current measure:

AGING =

var _datediff=Datediff([AR Invoice Date],today(),day)

return

SWITCH(

    TRUE(),

    _datediff<=30,"1 to 30 Day",

    _datediff<=60,"31 to 60 Day",

    "Over 60 day"

)

And you can get what you want, like this:

v-robertq-msft_0-1605598760412.png

 

You can download my test pbix file here

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Robert 

your script very smart , it will sort by itself.

Paul

Hi Robort

Thank you very much

Paul

Responsive Resident
Responsive Resident

@Paulyeo11  use the following DAX

 

Agein Bucket = SWITCH(TRUE(),

AND(Query1[AGING]>0,Query1[AGING]<=30),"1-30 Days",

AND(Query1[AGING]>30,Query1[AGING]<=60),"31-60 Days",

AND(Query1[AGING]>60,Query1[AGING]<=90),"61-90 Days",

AND(Query1[AGING]>90,Query1[AGING]<=120),"91-120 Days",

AND(Query1[AGING]>120,Query1[AGING]<=150),"121-150 Days",

AND(Query1[AGING]>150,Query1[AGING]<=180),"151-180 Days",BLANK())

Here is the required resultcommunity.png

Appreciate a Kudos if this resolves your Query !!

View solution in original post

Hi All 

Can some one help me how to make X axiz can sort in sequences ?

Paulyeo11_0-1605651191466.png

 

Hi Sir

This is beyond my expectation. This is better approach . ( my approach no goos , i create many field. )

Thank you 

Paul

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session Drive Data Culture with Power BI: Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors