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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
mudegowdrp
Helper II
Helper II

Previous Month should display 0 if there is no change

New count should zero for Jan month as there is no new items added.

 

Please see dataset and help me

 

I am getting output like this

Capture1.PNG

Here is my dataset and Expected result

Capture3.PNG

 

Measure looks like this.

 

NewApp = COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            VALUES ( Sheet1[App Name] ),
            "PreviousApps", CALCULATE (
                COUNTROWS ( Sheet1 ),
                FILTER (
                    ALL ( 'Sheet1'[Date].[Date] ),
                    'Sheet1'[Date].[Date] < MIN ( 'Sheet1'[Date].[Date] )
                )
            )
        ),
     
    [PreviousApps] = 0
))

 

 

Please help.

1 ACCEPTED SOLUTION
nickchobotar
Skilled Sharer
Skilled Sharer

@mudegowdrp

 

 

Give this one a try.

 

NewAppsCol =  
VAR Test =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Date] <= EARLIER ( Table1[Date] )
                && Table1[AppName] = EARLIER ( Table1[AppName] )
       )
    )
RETURN
IF(Table1[Month] = "January", BLANK(),  IF ( Test > 1, BLANK (), Test ))


NewAppsCount = COUNT(Table1[NewAppsCol])

image.pngimage.png

View solution in original post

8 REPLIES 8
nickchobotar
Skilled Sharer
Skilled Sharer

@mudegowdrp

 

 

Give this one a try.

 

NewAppsCol =  
VAR Test =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Date] <= EARLIER ( Table1[Date] )
                && Table1[AppName] = EARLIER ( Table1[AppName] )
       )
    )
RETURN
IF(Table1[Month] = "January", BLANK(),  IF ( Test > 1, BLANK (), Test ))


NewAppsCount = COUNT(Table1[NewAppsCol])

image.pngimage.png

@nickchobotar it works. Thank you so much 🙂

Greg_Deckler
Community Champion
Community Champion

Can you explain in words what defines the criteria for a "New App"? I can't really understand the criteria you are going for from your measure formula.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you for responding.

 

I need to buid a dashboard on Application Inventory dataset.

 

It has ID, Application Name and Date attribute.

 

What I need to show is new applications added month to month.

 

@Greg_Deckler Please see for more details. I need to show new Applications added month to month.

 

Ex: January Month has 3 Applications: a, b, c

     February has 2 new Applications: a,b,c,d,e

     March has 1 new Applications: a,b,c,d,e,f

     April has 0 new Applications: a,b,c,d,e,f

 

So my result table in power bi should give output as

 

Month           Application_Count           New_Application_Count

Jan                   3                                       0

Feb                  5                                       2

Jan                   6                                       1

Jan                   6                                       0

 

And When I click on February row

 

It should show

 

New Applications in February

d

e

 

 

 

 

I created a month table like:

 

Month, Num

Jan,1

Feb,2

Mar,3

Apr,4

 

My Apps table also included month short names, you could do this with a FORMAT or just get rid of the text-based month names and go with numeric using MONTH function. Related these two tables, then you can create calculated columns in Months table like so:

 

TotalApps = CALCULATE(COUNT(Apps[App]),FILTER(Apps,MONTH(Apps[Date])<=[Num]))

NewApps = VAR new = CALCULATE(COUNT(Apps[App]),FILTER(Apps,MONTH(Apps[Date])=[Num]))
RETURN IF(ISBLANK(new),0,new)

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler you are saying that Date Attribute in Apps table should be month number?

@nickchobotar by any chance did you delete your solution which you provided here?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.