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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jayasekera
New Member

Tracking Count of Rows on dataset

Hi, my requirement is to track the number of rows in my dataset on a weekly basis. 

 

For example:

Date: 09/09 there are 120 rows in the dataset.

Data: 16/09 there are 115 rows in the dataset (as user has removed rows in sharepoint excel datasheet). 

 

I want to show that at current date 16/09 that there has been a reduction of 5 rows in the week totalling 115 rows with a visual showing At 16/09 Total = 115 with arrow down of -5. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Jayasekera ,

First, please make sure the data exist in the data source just similar with the below table. 

yingyinr_0-1663207513018.png

Then you can create the measures and make conditional formatting for the visual to get it.

Difference = 
VAR _curdate =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _predate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] < _curdate )
    )
VAR _prenumbers =
    SUMX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _predate ),
        [Number of rows]
    )
RETURN
    IF ( ISBLANK ( _prenumbers ), BLANK (), [Count] - _prenumbers )
Conditional formatting = IF ( [Difference] = 0, 0, IF ( [Difference] > 0, 1, -1 ) )

yingyinr_1-1663209206535.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Jayasekera ,

First, please make sure the data exist in the data source just similar with the below table. 

yingyinr_0-1663207513018.png

Then you can create the measures and make conditional formatting for the visual to get it.

Difference = 
VAR _curdate =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _predate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] < _curdate )
    )
VAR _prenumbers =
    SUMX (
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _predate ),
        [Number of rows]
    )
RETURN
    IF ( ISBLANK ( _prenumbers ), BLANK (), [Count] - _prenumbers )
Conditional formatting = IF ( [Difference] = 0, 0, IF ( [Difference] > 0, 1, -1 ) )

yingyinr_1-1663209206535.png

Best Regards

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors