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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Measure as Calculated Column

Hello All, I have been struggling to resolve this.

 

I have measure which calculates the month difference from 2 dates which are measures. i need to apply that measure value in creating a flag with the below

NewWin=IF (
            Sales[cust] = "Not Defined",
            0,
            IF ( Sales[MonthCount] ) < 13, 1, 0 )
        )

 

- Sales[Cust] is a calculated column
- Sales[MonthCount] is a measure

I am able to create this as measure but not in calculated column, I need calculated column so that I can use this as slicer, can anyone please help?
@Ashish_Mathur  can you please look at this?

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Measures should not be referred to in calculated column formulas because calculated column formulas do not respond to change in filters/slicers.

Please share a dataset, describe the business question and show the expected result.  There could be a way to write a calculated column formula without calling a measure inside it.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thank you for your response. I am trying to find new customer wins compared in different time periods.

The below table has the logic in step by step for each time frame. TF is time frame.

Logic is, user selects year and month, if the CPDF number exists in the current month, get the earliest revenue date. Then from the current selected period, look back upto 12 months and find the earliest revenue date date, if the earliest invoice date is same as current period, then look back upto one more 12 months and find the earliest revenue date, if exists then check if the difference between this date and originally selected period is less than 13 months, if yes, then its a new win. 

 

I am able to create this logic and measures and owrks perfectly, however the challenge is I need to be able to select the New win as filter or slicer, so that user can select year, month and new win as yes or no. But I am not able to use measure as column to apply in filter/slicer.

 

Really appreciate your help in advance @Ashish_Mathur 

 

Here is the test file. https://1drv.ms/u/s!AoC3T84cA7LGjl3HbemEMeGx29Y_

 

Customer Parent number & Draws Combined Number (CPDF)Start DateEnd DateFIRST EARLIEST Revenue DATE IN Selected PeriodTF1 Start DateTF1 End Date"TF1 Date"TF2 Start DateTF2 End DateTF2 DateEnd Date of TF2 DateMonth Difference (TF2 and Selected Period)New Win ?
63759DF1612/1/201812/31/201812/2/201812/31/20181/1/201812/4/201712/31/20171/1/20161/1/20161/31/201636No

Hi,

I will not be able to help here because one cannot refer to a measure within a calculated column formula.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.