Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
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
Hello,
I have the data below
I want to have the cumulative data only for the item that contain cat1.
I've used the formula below using containstring
Could you please help me to solve this problem to get the good cumulative amounts after filtering by items only containing cat1.
Also is it possible to put the Measure cat_1_only_cumulative and then Measure cat_2_cumulative in a table as row with the dates like the example below
| Row Label | 01/01/2025 | 02/01/2025 | 03/01/2025 | 04/01/2025 | 05/01/2025 | 06/01/2025 | TOTAL |
| cat_1_only_cumulative | 1 | 2 | 3 | 4 | 5 | 6 | 6 |
| cat_2_cumulative | 1 | 1 |
Solved! Go to Solution.
Hi @yanisyes ,
Please create measures like:
cat_1_only_cumulative =
CALCULATE (
COUNT ( Table1[Row Label] ),
Table1[Attribute] <= MAX ( Table1[Attribute] ),
CONTAINSSTRING(Table1[Row Label],"cat1")
)cat_2_only_cumulative =
CALCULATE (
COUNT ( Table1[Row Label] ),
Table1[Attribute] <= MAX ( Table1[Attribute] ),
CONTAINSSTRING(Table1[Row Label],"cat2")
)
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 -- China Power BI User Group
Hi,
Why are you trying to pass the Cat1 condition in the CALCULATE() function? Why not give that condition in the FILTER() pane?
Hi @yanisyes ,
Please create measures like:
cat_1_only_cumulative =
CALCULATE (
COUNT ( Table1[Row Label] ),
Table1[Attribute] <= MAX ( Table1[Attribute] ),
CONTAINSSTRING(Table1[Row Label],"cat1")
)cat_2_only_cumulative =
CALCULATE (
COUNT ( Table1[Row Label] ),
Table1[Attribute] <= MAX ( Table1[Attribute] ),
CONTAINSSTRING(Table1[Row Label],"cat2")
)
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 -- China Power BI User Group
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 |
|---|---|
| 56 | |
| 47 | |
| 44 | |
| 20 | |
| 20 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 34 | |
| 33 | |
| 31 |