The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everyone,
I have a table_1 which has columns ( qty, procurement,week)
so under qty there are values, Under procurement we have different categories (1,2,3,4). Under week we have ( week 1-20)
So I have to create a measure to get a value when,
[( Values from qty which are of 2nd category only and week from 11-16 only (subtract) Values from qty which are of 4th category and week from 11-16 only ( divide) Values from qty which are of 2nd category only and week from 11-16 only ]
Pardon me If I am not conveying it in proper way as I am new to the community and powerbi.
Thanks
@amitchandak
Solved! Go to Solution.
hi @Anonymous
try like:
Measure =
VAR _value1 =
CALCULATE(
SUM(TableName[qty]),
TableName[Procurement]=2,
TableName[week]>=11,
TableName[week]<=16
)
VAR _value2 =
CALCULATE(
SUM(TableName[qty]),
TableName[Procurement]=4,
TableName[week]>=11,
TableName[week]<=16
)
RETURN
DIVIDE(_value1 - _value2, _value1)
hi @Anonymous
try like:
Measure =
VAR _value1 =
CALCULATE(
SUM(TableName[qty]),
TableName[Procurement]=2,
TableName[week]>=11,
TableName[week]<=16
)
VAR _value2 =
CALCULATE(
SUM(TableName[qty]),
TableName[Procurement]=4,
TableName[week]>=11,
TableName[week]<=16
)
RETURN
DIVIDE(_value1 - _value2, _value1)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
15 | |
13 |
User | Count |
---|---|
41 | |
36 | |
22 | |
22 | |
17 |