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
neetu14
Employee
Employee

% of users : today vs yesterday

I am trying to calculate the percentage change in the number of users today compared to yesterday for the number of users column to see the growth.

 

can someone help with the Dax measure for calculating the percentage?

1 ACCEPTED SOLUTION

Hi @neetu14 ,

 

Check this measure

Measure = 
var today = CALCULATE(SUM('Table'[NumberOfUsers]),FILTER('Table','Table'[SnapshotDate]=TODAY()))
var yesterday = CALCULATE(SUM('Table'[NumberOfUsers]),FILTER('Table','Table'[SnapshotDate]=TODAY()-1))
return
(today-yesterday)/yesterday

Here's the result. Let me know if it works.

1.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

@neetu14 

it depends on your data model

in the most common case it will look like

Measure = 
DIVIDE(
CALCULATE(DISTINCTCOUNT(Table[UserID]), Table[Date] = TODAY()),
CALCULATE(DISTINCTCOUNT(Table[UserID]), Table[Date] = TODAY()-1)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

I tried to use your formula

Percentage_Usage - DIVIDE(
CALCULATE(COUNT(Table[NumberOfUsers]), Table[SnapshotDate] - TODAY()),
CALCULATE(COUNT(Table[NumberOfUsers]), Table[SnapshotDate] ? TODAY()-1)
)
it is not giving any value 😞

I tried using your formula

Percentage_Usage = DIVIDE(
CALCULATE(COUNT(Table[NumberOfUsers]), Table[SnapshotDate] = TODAY()),
CALCULATE(COUNT(Table[NumberOfUsers]), Table[SnapshotDate] = TODAY()-1)
)
 
it is not giving any values 😞

Hi @neetu14 ,

 

Check this measure

Measure = 
var today = CALCULATE(SUM('Table'[NumberOfUsers]),FILTER('Table','Table'[SnapshotDate]=TODAY()))
var yesterday = CALCULATE(SUM('Table'[NumberOfUsers]),FILTER('Table','Table'[SnapshotDate]=TODAY()-1))
return
(today-yesterday)/yesterday

Here's the result. Let me know if it works.

1.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
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.