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
jackj
Helper I
Helper I

Create a fixed denominator

I'm struggling with a fairly straightforward issue and would love some assistance...

 

I have a matrix that contains the following, based on a table of order details that includes userID, date, and $ amount:

 

Rows = [First Purchase Week], a calculated column that looks for the first date of purchase for each userID.

Columns = [Week End], a calculated column that looks for the week ending that corresponds with each order date.

Values = [Count of UserID], a measure. "Count of UserID = DISTINCTCOUNT('warehouse OrderDetails'[UserID])"

 

The matrix displays values exactly as I would want them to appear.

 

What I would like to do, however, is fix the denominator of the values of the first purchase week, and use this total as the basis for cohort based analysis.  Literally dividing the results of each subsequent week, one by one, by the first week.  Below is a screenshot of the matrix

 

1Untitled.png

 

For example, I want to be able to calculate each week of the group whose first visit was 4/3/2021 (19 users), and show the percentage of them that returned each week - 19/19 in week 1, 13/19 in week 2, 4/19 in week 3, etc.

 

How can I do this?

 

Thanks in advance for any help here.

1 ACCEPTED SOLUTION

Hi,

This measure seems to work

Measure 2 = DIVIDE([Count of UserID],CALCULATE([Count of UserID],ALL('warehouse OrderDetails'[Week End])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

See if my solution here helps - Identify Customers that Organisations can upsell or cross sell their products to.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

I'm not sure that this helped.  I did not see the applicability here.

 

Effectively, all I am trying to do is replicate something similar to an absolute cell reference in powerBI.  I want to always be able to use the count of users whose first visit week was in a certain period and fix that denominator against a count of those users who appeared in other weeks going forward.

Hi,

This measure seems to work

Measure 2 = DIVIDE([Count of UserID],CALCULATE([Count of UserID],ALL('warehouse OrderDetails'[Week End])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This worked perfectly!  Thank you!!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
jackj
Helper I
Helper I

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.