cancel
Showing results for
Did you mean:
Frequent Visitor

Comparing previous month value to next month on available months only

Hi

my data is as follows

i want to tshow the arrow marks depending on the available dates in the date column only. the dates are not continues. how can i create a measure to insert the arrow marks in the new column.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

Re: Comparing previous month value to next month on available months only

Hi NPK,

You can use DAX formula like below:

```Mark =

var preDate = CALCULATE(MAX(Table1[Date]), FILTER(ALL(Table1), Table1[Product Name] = EARLIER(Table1[Product Name]) && Table1[Date] < EARLIER(Table1[Date])))

var preResult = CALCULATE(MAX(Table1[Result]), FILTER(ALL(Table1), Table1[Product Name] = EARLIER(Table1[Product Name]) && Table1[Date] = preDate))

return

IF(preResult <> BLANK(), IF(Table1[Result] > preResult, UNICHAR(9650), UNICHAR(9660)))```

You can refer to PBIX here:

https://www.dropbox.com/s/2n90rdatt9vgozv/For%20KingsleyZ.pbix?dl=0

Regards,

Jimmy Tao

2 REPLIES 2
Community Support Team

Re: Comparing previous month value to next month on available months only

Hi NPK,

You can use DAX formula like below:

```Mark =

var preDate = CALCULATE(MAX(Table1[Date]), FILTER(ALL(Table1), Table1[Product Name] = EARLIER(Table1[Product Name]) && Table1[Date] < EARLIER(Table1[Date])))

var preResult = CALCULATE(MAX(Table1[Result]), FILTER(ALL(Table1), Table1[Product Name] = EARLIER(Table1[Product Name]) && Table1[Date] = preDate))

return

IF(preResult <> BLANK(), IF(Table1[Result] > preResult, UNICHAR(9650), UNICHAR(9660)))```

You can refer to PBIX here:

https://www.dropbox.com/s/2n90rdatt9vgozv/For%20KingsleyZ.pbix?dl=0

Regards,

Jimmy Tao

Frequent Visitor

Re: Comparing previous month value to next month on available months only

Thanks Jimmy Tao, your soluton helped me to solve the problem.

Announcements

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 47 members 1,325 guests
Recent signins: