Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi everyone!
I want to optimize a measure that I´ve calculated but I´m getting trouble trying to get the same result with different coding approaches.
In my data model I have something like this:
Fact_Table connected to Product dimension, to Time dim, Customer dim, Stores dim.
I want to calculate how many unique products I have in the combination Customer - Stores.
Example:
Customer A
-Store A: 4 unique products.
-Store B: 6 unique products.
Customer B
-Store 01: 10 unique products.
-Store 02: 4 unique products.
When adding in a Table visual Customer Name + Measure I should see:
Customer A: 10
Customer B: 14
I´ve managed to get this result doing this but performance sucks 😞
COUNTROWS(
GROUPBY (
Fact_Table,
'Customer'[Customer Name],
'Store'[Store Name],
'Product'[Item ID]
)
)
Hi @Anonymous ,
Could you please post some simple sample data and your desired result to have a test if possible? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Daniel He
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 |
|---|---|
| 53 | |
| 37 | |
| 34 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 72 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |