Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Expected output
Sample data:
QUANTITYORDERED
| PRICEPERUNIT
| ORDERLINENUMBER
| SALES
| ORDERDATE
| PRODUCTLINE
| MSRP
| PRODUCTCODE
| COUNTRY
| TERRITORY
|
Solved! Go to Solution.
Hi @Maha_0221
@lbendlin @xifeng_L Thank you very much for your prompt reply, and here allow me to share some of the content.
Since you didn't explain the calculation logic, here I assume the following:
RESULT =
var TotalProduct = COUNTROWS('Table')
var selectProductCode =
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[TERRITORY] <> "NA" //You can change the filter, for example: 'Table'[TERRITORY] <> "APAC"
)
)
RETURN selectProductCode / TotalProduct
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Maha_0221
@lbendlin @xifeng_L Thank you very much for your prompt reply, and here allow me to share some of the content.
Since you didn't explain the calculation logic, here I assume the following:
RESULT =
var TotalProduct = COUNTROWS('Table')
var selectProductCode =
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[TERRITORY] <> "NA" //You can change the filter, for example: 'Table'[TERRITORY] <> "APAC"
)
)
RETURN selectProductCode / TotalProduct
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The example data has only one product code, can you provide more example data and pbix files?
And it would be nice to have a demonstration of the calculation logic.
Sample data:
ORDERNUMBER | QUANTITYORDERED | PRICEPERUNIT | ORDERLINENUMBER | SALES | ORDERDATE | STATUS | PRODUCTLINE | MSRP | PRODUCTCODE | COUNTRY | TERRITORY |
10424 | 50 | 100 | 6 | 12001 | 4/6/2022 0:00 | In Process | Classic Cars | 214 | S10_1949 | Spain | EMEA |
10425 | 38 | 100 | 12 | 5894.94 | 4/6/2022 0:00 | In Process | Classic Cars | 147 | S10_4962 | France | EMEA |
10424 | 49 | 100 | 3 | 7969.36 | 4/6/2022 0:00 | In Process | Trucks and Buses | 136 | S12_1666 | Spain | EMEA |
10425 | 33 | 100 | 4 | 4692.6 | 4/6/2022 0:00 | In Process | Trucks and Buses | 118 | S12_4473 | France | EMEA |
10424 | 54 | 100 | 5 | 7182 | 4/6/2022 0:00 | In Process | Trucks and Buses | 116 | S18_1097 | Spain | EMEA |
10422 | 51 | 95.55 | 2 | 4873.05 | 4/5/2022 0:00 | In Process | Vintage Cars | 102 | S18_1342 | USA | NA |
10422 | 25 | 51.75 | 1 | 1293.75 | 4/5/2022 0:00 | In Process | Vintage Cars | 53 | S18_1367 | USA | NA |
10420 | 37 | 100 | 5 | 5283.6 | 4/4/2022 0:00 | In Process | Vintage Cars | 170 | S18_1749 | Australia | APAC |
10425 | 28 | 100 | 3 | 5318.04 | 4/6/2022 0:00 | In Process | Classic Cars | 163 | S18_2238 | France | EMEA |
10420 | 36 | 63.57 | 4 | 2288.52 | 4/4/2022 0:00 | In Process | Vintage Cars | 60 | S18_2248 | Australia | APAC |
10425 | 38 | 99.41 | 7 | 3777.58 | 4/6/2022 0:00 | In Process | Trucks and Buses | 122 | S18_2319 | France | EMEA |
Sample
please do not post links to your reports.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
User | Count |
---|---|
61 | |
46 | |
19 | |
18 | |
15 |
User | Count |
---|---|
119 | |
41 | |
40 | |
28 | |
22 |