Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
Here is the problem description.
I have a column of product names A,B,C,D....
I have entries of product sales revenue from each day. (colums of product names, date of sales, sales revenue value)
I would like to have another column to show when e.g. accumulated product A sales reaches 1M. (The date it becomes a so-called mature product in the market.)
How I should formulate the DAX in a calculated field / a customized column?
Thanks in advance.
Solved! Go to Solution.
Please check the file attached in my earlier post
It works with the slicer for Products
Hi @Qianru221
Try this
First Add a Measure
Cumulative =
SUMX (
FILTER (
ALL ( TableName[ Date ] ),
TableName[ Date ] <= SELECTEDVALUE ( TableName[ Date ] )
),
CALCULATE ( SUM ( TableName[ Revenue ] ) )
)Then you can get the first date sales reach 1 Miilion using this MEASURE
Date when 1 Million reached =
TOPN (
1,
FILTER ( ALL ( TableName[ Date ] ), [Cumulative] > 1000000 ),
[Cumulative], ASC
)
Hi,
Thank you for your help!
Would it be possible to have it for each product A,B,C,D....? Cos each product have a culmulative revenue, and the date is only marked out when the number the culmulative revenue is reached for each product. But product A,B,C,D may all have a different date.
Do you have a Cumulative Revenue Column already?
Could you paste your dataset and desired OUTPUT?
Try this MEASURE.
Date when 1 Million reached =
VAR RESULT =
TOPN (
1,
FILTER ( ALL ( TableName[ Date ] ), [Cumulative] > 1000000 ),
[Cumulative], ASC
)
RETURN
IF ( SELECTEDVALUE ( TableName[ Date ] ) = RESULT, Result )You will get
Thanks
This is exactly what I want!
However now I am still having difficulty with the culmulative measure. The one you wrote earlier on does not have a filter on product type or?
Please check the file attached in my earlier post
It works with the slicer for Products
I have worked out the solution you provided me with.
Is there a way to work without the slicers? So that I will be able to have the date for each product. (Because later I need to create a table including product and the date when the sales volumn reaches 1M)
Many thanks!!
Best,
Qianru
No. I dont have one.
I only have a query containing lines of entries of, product type (a,b,c,d....) and time sold (dates) and revenue earned for that sale.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |