March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a simple measure that is as follows:
What I need to accomplish is to make this measure conditional, based on the site:
If the Site equals 21201, then the formula should be:
AVG QTY PRODUCED = COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 4 DAY])
Otherwise, it should be:
AVG QTY PRODUCED = COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 5 DAY])
There is a need to look at the information as a whole, and separately, so I don't think separate measures will work.
Link to project mockup:
https://1drv.ms/u/s!Ar8mMAEgH9mzaiaJKQo9b7ZOR1I
This has been keeping me up at night. Any help is appreciated.
Solved! Go to Solution.
Have you tried hard code on it?
AVG QTY PRODUCED =
VAR _site = SELECTEDVALUE(TABLE[SITE])
RETURN
IF _site = 21201;
COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 4 DAY]);
AVG QTY PRODUCED = COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 5 DAY]))
Did I answer your question? Mark my post as a solution!
Ricardo
That's a good idea. This is what worked.
Have you tried hard code on it?
AVG QTY PRODUCED =
VAR _site = SELECTEDVALUE(TABLE[SITE])
RETURN
IF _site = 21201;
COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 4 DAY]);
AVG QTY PRODUCED = COUNT('SHIPMENTS OUT'[ORDER_NO])/SUM('CALENDAR'[DAYS WORKED 5 DAY]))
Did I answer your question? Mark my post as a solution!
Ricardo
That's a good idea. This is what worked.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |