Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I have written a measure and of course by default the measure will calculate based on the row context. Is there any way to basically make the measure only calculate for a specific row and then return 0 for the row which it does not correlate to?
For example the measure ROS #£M Web should only be calculated for ONLINE branches but because it is doing a row by row calculation it will do the same for 'IN STORE' when I actually need the 'IN STORE' to return 0
Solved! Go to Solution.
@Anonymous Try this .
ROS # £M Web = IF ( SELECTEDVALUE('Campaign Overview'[Type]) = "IN STORE", 0, ROUND ( DIVIDE ( SUM('Campaign Overview'[orders]), SUM('Campaign Overview'[salesPerMillion]) ), 2 ) )
@Anonymous Try this .
ROS # £M Web = IF ( SELECTEDVALUE('Campaign Overview'[Type]) = "IN STORE", 0, ROUND ( DIVIDE ( SUM('Campaign Overview'[orders]), SUM('Campaign Overview'[salesPerMillion]) ), 2 ) )
@Anonymous Try this .
ROS # £M Web = IF ( SELECTEDVALUE('Campaign Overview'[Type]) = "IN STORE", 0, ROUND ( DIVIDE ( SUM('Campaign Overview'[orders]), SUM('Campaign Overview'[salesPerMillion]) ), 2 ) )
HEllo @Anonymous ,
try this
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
Proud to be a Super User! | |
that returns 0.55 for both online and in store
because the code will apply the same for the instore reason why it cant be added within the code because the row context will still override it
Thanks for the response, that is similar to what I tried but when that happens it just repeats the same value for both like so:
Hello @Anonymous ,
Can you show me your measure?
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
Proud to be a Super User! | |
| Type | ROS #£ Web |
| IN STORE | 0 |
| ONLINE | 0.55 |
Hello @Anonymous ,
yes sure try this
New measure =
var ONLINE = calculate ( "Add here the ROS #£M Web calculation " , branch_type = "ONLINE")
return
if ( ONLINE = blank(), 0, ONLINE)
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
Proud to be a Super User! | |
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |