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.
Solved! Go to Solution.
@tkavitha911 , Try using
DAX
ADDCOLUMNS(
SUMMARIZE(
'Daily Inventory',
'Daily Inventory'[Country New name]
),
"ThisThursdayNetInventory", CALCULATE(
[Net Inventory mUSD],
FILTER(
ALLEXCEPT('Daily Inventory', 'Daily Inventory'[Country New name], 'Daily Inventory'[Location_c], 'Daily Inventory'[Type]),
'Daily Inventory'[Date] =
VAR TodayDate = TODAY()
VAR ThisThursdayDate = TodayDate + (5 - WEEKDAY(TodayDate, 2))
RETURN ThisThursdayDate
)
),
"LastThursdayNetInventory", CALCULATE(
[Net Inventory mUSD],
FILTER(
ALLEXCEPT('Daily Inventory', 'Daily Inventory'[Country New name], 'Daily Inventory'[Location_c], 'Daily Inventory'[Type]),
'Daily Inventory'[Date] =
VAR TodayDate = TODAY()
VAR LastThursdayDate = TodayDate - WEEKDAY(TodayDate, 2) - 2
RETURN LastThursdayDate
)
),
"Difference", [ThisThursdayNetInventory] - [LastThursdayNetInventory]
)
Proud to be a Super User! |
|
Hi @tkavitha911 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @tkavitha911 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @tkavitha911
Thank you for reaching out to the Microsoft fabric community forum. Also thank you @bhanu_gautam for providing solution.
To assist you better, could you please clarify what you're trying to achieve with this calculated table? Specifically, are you looking to compare net inventory values for this Thursday versus last Thursday by country and location?
Also, are [ThisThursdayNetInventory] and [LastThursdayNetInventory] defined measures, or are you trying to calculate them within this expression? Lastly, please share the exact error message you're encountering. This will help us provide more accurate guidance.
Thank you.
Hi @tkavitha911 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
@tkavitha911 , Try using
DAX
ADDCOLUMNS(
SUMMARIZE(
'Daily Inventory',
'Daily Inventory'[Country New name]
),
"ThisThursdayNetInventory", CALCULATE(
[Net Inventory mUSD],
FILTER(
ALLEXCEPT('Daily Inventory', 'Daily Inventory'[Country New name], 'Daily Inventory'[Location_c], 'Daily Inventory'[Type]),
'Daily Inventory'[Date] =
VAR TodayDate = TODAY()
VAR ThisThursdayDate = TodayDate + (5 - WEEKDAY(TodayDate, 2))
RETURN ThisThursdayDate
)
),
"LastThursdayNetInventory", CALCULATE(
[Net Inventory mUSD],
FILTER(
ALLEXCEPT('Daily Inventory', 'Daily Inventory'[Country New name], 'Daily Inventory'[Location_c], 'Daily Inventory'[Type]),
'Daily Inventory'[Date] =
VAR TodayDate = TODAY()
VAR LastThursdayDate = TodayDate - WEEKDAY(TodayDate, 2) - 2
RETURN LastThursdayDate
)
),
"Difference", [ThisThursdayNetInventory] - [LastThursdayNetInventory]
)
Proud to be a Super User! |
|
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |