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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Creating a measure with a filter (field)

Greetings all. 

 

I'm working on a dashboard based on a dataset, to which I have a "live" connection, meaning I cannot create columns or use Power Query. 

 

I have one measure, with the average compliance values and a field with relative months. 

 

I need to calculate the difference in percentile points between the compliance of "relative month" -1 and "relative month" -2.

 

So basically, if I put the measure into a visual and add the relative months, month-1 shows 84,5 and month-2 shows 78,9.

The diffence in percentile points is 5,4 (just a decimalnumber). 

 

I then need to add either a + and a space or a minus and a space before said number, so the meaning is easy to understand, but I need to also be able to apply conditional formatting to it. (Show green arrow, red arrow depending on value). 

 

Is this in any way possible?

 

And if it need to be done in the dataset, how would it be done? (If not possible on the reportside.)

 

Thanks in advance. 

 

Robert.

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

1 Yes, you can try to use CONCATENATE() to splice "+ " and numbers. 

 

2 For the 'relative months', use CALCULATE() to replace its current context with the month you want. Some measures like the below:

CALCULATE( SUM( 'Table'[values] ) , DATEADD( 'Date'[date],-1, month)) 

 

3 How to add green arrow or red arrow, please refer this link.

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

 

All these above can be done with measure in Live Connection mode.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

1 Yes, you can try to use CONCATENATE() to splice "+ " and numbers. 

 

2 For the 'relative months', use CALCULATE() to replace its current context with the month you want. Some measures like the below:

CALCULATE( SUM( 'Table'[values] ) , DATEADD( 'Date'[date],-1, month)) 

 

3 How to add green arrow or red arrow, please refer this link.

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

 

All these above can be done with measure in Live Connection mode.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

Anonymous
Not applicable

Thank you @v-chenwuz-msft 🙂 (And sorry for the late reply, I just returned from vacation.)

 

Is there a way to determine the max (latest) date ind a datemeasure (with the live connection)?

 

Right now, my datefield/measure has the latest six months of data, but the latest month is not the "real" current month.. I'm assuming, I need to do something to first determine the latest month in that measure, before I can calculate relative months in it.. What do you think?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.