Forum Discussion
Issue with the parameters in the Power BI App published for outside the organization
Dear All,
I have data which contains monthly sales values, in this you have the month the product name ( unique) / the vendor code / and the sales amount. In another table i have the dimcodes where it bifurcates the product further into categories and the vendor code into type of distributors, The issue is i get the total correct using the formula ( mentioned below) but then i put the category in the matrix the total does not match.
| Product | Distributor 1 | Distributor 2 | Distributor 3 | Distributor 4 | Distributor 5 | Total of this | This total is correct . |
| product 1 | 474 | 21 | 349 | 299 | 11 | 1154 | 1200 |
| product 2 | 324 | 9 | 386 | 232 | 16 | 967 | 1006 |
Tables 1 ( which has the main data is ). Please note the dates are the same but each row item had product and vendor name, and keeps changing for eg in one line item we may have product 1 and vendor 1 in the second line we may have product 2 and vendor 1 and so on.
| Month | Product | Vendor code | Sales |
| 31-12-2025 | product 1 | vendor 1 | 100 |
| 31-12-2025 | product 2 | vendor 2 | 200 |
| 31-12-2025 | product 3 | vendor 3 | 300 |
| 31-12-2025 | product 4 | vendor 4 | 400 |
| 31-12-2025 | product 1 | vendor 4 | 500 |
| 31-12-2025 | product 2 | vendor 3 | 600 |
| 31-12-2025 | product 3 | vendor 2 | 700 |
| 31-12-2025 | product 4 | vendor 1 | 800 |
| 31-12-2025 | product 4 | vendor 3 | 200 |
| 31-12-2025 | product 3 | vendor 1 | 250 |
| 31-12-2025 | product 2 | vendor 4 | 300 |
| 31-12-2025 | product 1 | vendor 2 | 600 |
Other table has dim codes like this
| category for products | Main Category |
| product 4 | Books |
| product 3 | Books |
| product 2 | Pens |
| product 1 | Pens |
| category for Vendors | Main Category |
| vendor 3 | Cat 2 |
| vendor 1 | Cat 1 |
| vendor 4 | Cat 2 |
| vendor 2 | Cat 3 |
Dax measures for total sales is
Total Sales MTD = //Try this might help you
SUMX(
table1,
CALCULATE(
table1[Sales],
DATESMTD(DIMDatesQ[EOM]),
TREATAS(VALUES(DimProducts[Main Category]), table1[Product]),
TREATAS(VALUES(DimVendors[Main Category]), table1[Vendor Code])
)
)