The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, what I am trying to do is to filter 'Inventory Material DC'[IMDC DC], based on 'Distributor'[DIST Country].
'Distributor'[DIST Country] should be equal to "Poland" or "Denmark".
'Inventory Material DC'[IMDC DC] can be all if 'Distributor'[DIST Country] is not "Poland", if "Poland" then 'Inventory Material DC'[IMDC DC] should be different than 100.
Is it possible to create such a filter?
*I am using PowerBI Report Builder.
DEFINE
VAR yesterday =
TODAY () - 1
VAR from_date =
TODAY () - 28
MEASURE 'Inventory Measures'[Operational Inventory Total] =
CALCULATE (
[Operational Inventory],
FILTER (
ALL ( 'Inventory Date' ),
'Inventory Date'[INVD Date] >= from_date
&& 'Inventory Date'[INVD Date] <= yesterday
)
)
EVALUATE
SUMMARIZECOLUMNS (
'Distributor'[DIST Country],
'Inventory Material DC'[IMDC DC],
FILTER (
VALUES ( 'Distributor'[DIST Country] ),
( 'Distributor'[DIST Country] = "Poland" )
|| ( 'Distributor'[DIST Country] = "Denmark" )
),
"Operational Inventory Total", 'Inventory Measures'[Operational Inventory Total],
)
Hi @Anonymous ,
What is the logic of the following sentence? If the country is not Poland or Denmark, all 'Inventory Material DC'[IMDC DC] values will be calculated; if it is one of these two countries, it will be 100? Please correct me if my understanding is wrong...
'Distributor'[DIST Country] should be equal to "Poland" or "Denmark".
'Inventory Material DC'[IMDC DC] can be all if 'Distributor'[DIST Country] is not "Poland", if "Poland" then 'Inventory Material DC'[IMDC DC] should be different than 100.
In order to provide you a suitable solution, could you please share some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified rdl file. Thank you.
How to upload PBI in Community
Best Regards
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |