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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mak
Helper I
Helper I

Compare data records with previous period and calculate Count

Goal is to find how many Clients were a repeat Clients

 

I have a dateSlicer and a table with Clients with VisitDate

 

Clients Table

Client Id .   VisitDate . 

 

Report is a Matrix as below

DateSlicer[Date] .  #Clients .   #RepeatClients .  %RepeatClients

Jan .                     10 .          0                         0

Feb                       20           5                         50%

 

Now sure how should I proceed on it

 

thank you

 

1 REPLY 1
Phil_Seamark
Employee
Employee

Hi @mak

 

You can probably get something basic up and running with the following measures:.  Please just change the table/column names to match yours.

 

Oh and I coverted your first column to an actual date , eg '2017-01-01' rather thant the text 'Jan'

 

Sum of Clients = CALCULATE(sum('Table2'[#Clients]))


Sum of Clients Previous Month = CALCULATE('Table2'[Sum of Clients],PREVIOUSMONTH('Table2'[Date]))


Difference = [Sum of Clients]-[Sum of Clients Previous Month]

 

clients.png

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.