Forum Discussion

RobThrive's avatar
RobThrive
Icon for Resolver I rankResolver I
7 years ago
Solved

Measure Counting Observations by Reference - change based on slider

Hello,

I sorry I know this is likely a very simple question but I've not yet wrapped my head around DAX and measures.

 

I have data like the example below, I pulled it from SQL where cnt is the number of observations (rows) by reference.

But what I need is a measure in PowerBI that counts the number of rows/observations by reference even when a slider changes the dates. So if the slider started 2019-01-03 to 2019-01-05, then abc123 will only say 1 rather than 3, but xyz789 will continue to read 2.

 

Reference, cnt, date,

abc123, 3, 2019-01-01

abc123, 3, 2019-01-02

abc123, 3, 2019-01-03

xyz789, 2, 2019-01-04

xyz789, 2, 2019-01-05

 

Many thanks in advance,

 

  • Anonymous's avatar
    Anonymous
    7 years ago
    -- T is the name of the table.

    [measure] = countrows ( T )

    Best
    D.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable
    -- T is the name of the table.

    [measure] = countrows ( T )

    Best
    D.