cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
dsmitha
Responsive Resident
Responsive Resident

how to calculate ageing using DAX

Hi,

 

Request your guidance to solve this issue

I have a table which contains details of invoices,  my boss wants to calculate ageing of invoices, like if the invoice date is 7 days older then the colour of that row should change to amber, if invoice date is greater than 10 days then the colour of the row should change to red

kindly advice

 

regards,

dsmitha

1 ACCEPTED SOLUTION
ronaldbalza2023
Continued Contributor
Continued Contributor

Hi @dsmitha , hope you are having a great day. Sounds like a color formatting to me. Assuming that you already have dax for aging days. If wasn't, see here sample aging days measure Dynamic Grouping 

Aging Days Formatting =
SWITCH (
    TRUE (),
    [Aging Days] >= 7, "Amber", /*Check the hexcode for amber*/
    [Aging Days] >= 10, "Red", 
    BLANK ()
)

 

View solution in original post

2 REPLIES 2
ronaldbalza2023
Continued Contributor
Continued Contributor

Hi @dsmitha , hope you are having a great day. Sounds like a color formatting to me. Assuming that you already have dax for aging days. If wasn't, see here sample aging days measure Dynamic Grouping 

Aging Days Formatting =
SWITCH (
    TRUE (),
    [Aging Days] >= 7, "Amber", /*Check the hexcode for amber*/
    [Aging Days] >= 10, "Red", 
    BLANK ()
)

 

Hi ronaldbalza2023,
thank you for the quick and ultra simple solution,. it really helped me
thanks again
 
regards,
dsmitha
 
PREVIEW
 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

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

Top Solution Authors
Top Kudoed Authors