Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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.
@Anonymous ,
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.
@Anonymous ,
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.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 16 | |
| 8 | |
| 7 | |
| 7 | |
| 6 |