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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
HenryJS
Post Prodigy
Post Prodigy

Count IF Measure

Hi all,

 

How can I create a measure that counts candidate ref if it is not present on a previous application date?

 

 

 

Capture.PNG

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

Hi, @HenryJS 

According to your description, I can roughly understand your requirement, you want to count the newly appeared Candidate Ref that didn’t exist on the last day, right? I think you can try these calculated columns and a measure to achieve this:

This is my test data based on your description and sample data:

v-robertq-msft_0-1620975972931.png

 

  1. Create 2 calculated columns:
Rank = RANKX('Table',[Application Date],,ASC,Dense)
Flag =

var _lastdate=

SELECTCOLUMNS(FILTER(ALL('Table'),[Rank]=EARLIER([Rank])-1),"1",[Candidate Ref])

return

IF(

    [Rank]=1,

    0,

    IF([Candidate Ref] in _lastdate,

    0,1))
  1. Create a measure:
Count IF Measure =

SUM('Table'[Flag] )

 

Then create a card chart to place this measure, and you can get what you want, like this:

v-robertq-msft_1-1620975972977.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

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

1 REPLY 1
v-robertq-msft
Community Support
Community Support

Hi, @HenryJS 

According to your description, I can roughly understand your requirement, you want to count the newly appeared Candidate Ref that didn’t exist on the last day, right? I think you can try these calculated columns and a measure to achieve this:

This is my test data based on your description and sample data:

v-robertq-msft_0-1620975972931.png

 

  1. Create 2 calculated columns:
Rank = RANKX('Table',[Application Date],,ASC,Dense)
Flag =

var _lastdate=

SELECTCOLUMNS(FILTER(ALL('Table'),[Rank]=EARLIER([Rank])-1),"1",[Candidate Ref])

return

IF(

    [Rank]=1,

    0,

    IF([Candidate Ref] in _lastdate,

    0,1))
  1. Create a measure:
Count IF Measure =

SUM('Table'[Flag] )

 

Then create a card chart to place this measure, and you can get what you want, like this:

v-robertq-msft_1-1620975972977.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

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.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.