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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

[HELP] How to visualize the inflow and outflow of customers and sales with DAX

Hello Power BI Experts,

 

I want to make a combo chart of a stacked column and line chart for the subscription model business.

 

Chart 1: The number of new customers, lost consumers, and the net number with slicer by country
Chart 2: The sum of new sales, lost sales, and the net sales with slicer by country

 

osadma_0-1673150510028.png

Client CodeSalesFirst Subscription Date (EOM)Last Subscription Date (EOM)Country
10001.593/31/202011/30/2022Germany
10002.583/31/202011/30/2022Germany
100123/31/20204/30/2020Japan
100210.419/30/202211/30/2022Italy
100717.073/31/202011/30/2022France
100722.963/31/202011/30/2022France
100727.763/31/202011/30/2022France
100816.743/31/202011/30/2022Hong Kong
10133.23/31/20209/30/2020Brazil
101459.984/30/20206/30/2022Japan
101461.984/30/20206/30/2022Japan
101523/31/202011/30/2022Indonesia
10174.393/31/202011/30/2022Thailand
10204.593/31/202011/30/2022South Africa

I have managed to identify the first and last subscription dates with DAX, but I'd like to know how to proceed with the next. Any advice on DAX would be appreciated. I appreciate any help you can provide.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Not sure. Calculates the minimum date under the current filter table and country that is greater than the current date.

Please try this:

Nextdate = CALCULATE(MIN('Table'[Date]),'Table'[Country]=MAX('Table'[Country])&&'Table'[Date]>MAX('Table'[Date]))

vcgaomsft_0-1673251439476.png

If this does not work, please consider providing sample data and expected output.

 

Best Regards,
Gao

Community Support Team

 

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 feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Not sure. Calculates the minimum date under the current filter table and country that is greater than the current date.

Please try this:

Nextdate = CALCULATE(MIN('Table'[Date]),'Table'[Country]=MAX('Table'[Country])&&'Table'[Date]>MAX('Table'[Date]))

vcgaomsft_0-1673251439476.png

If this does not work, please consider providing sample data and expected output.

 

Best Regards,
Gao

Community Support Team

 

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 feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Anonymous
Not applicable

@Anonymous  Thank you, I have managed to solve the issue based on your idea!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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