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
dark_pony
New Member

Using measure on a subset of rows

Hi, everyone!

I am newbie to Power BI who is struggling with DAX measures. Help from generous and knowledgeable people would be highly appreciated.

So, here are the relations of users and their bought subscriptions record :
1) where "users" are people just registered, 
2) "clients" are those who bought any subscription_package at any point of time
3) "package" is the buying records of clients with start_date and end_date of package. (package names: "Standard", "VIP", etc.)

Screenshot 2022-08-23 122552.png

My goal is to display the statistics of subscriptions bought among the people who registered on the same day(example: among 26 registered people on April 13, 7 bought "Standard" package on the same day).

Screenshot 2022-08-23 124022.png

  
The problem is in table "package" where the rows represent bought packages of all users. How to track only activities of people just registered and bought on the same day and 30 day period?

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @dark_pony,

 

You need add filters to your calculation including a filter that will get the registered users and a filter that get date in the range of previous 30 days. Basically, Calculate and Filter function can help you do that. You may read about these two functions.

CALCULATE function (DAX) - DAX | Microsoft Docs

FILTER function (DAX) - DAX | Microsoft Docs

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please provide some sample data from your tables. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

1 REPLY 1
v-cazheng-msft
Community Support
Community Support

Hi @dark_pony,

 

You need add filters to your calculation including a filter that will get the registered users and a filter that get date in the range of previous 30 days. Basically, Calculate and Filter function can help you do that. You may read about these two functions.

CALCULATE function (DAX) - DAX | Microsoft Docs

FILTER function (DAX) - DAX | Microsoft Docs

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please provide some sample data from your tables. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

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.

Top Kudoed Authors