Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
@joluwa Try this .
ROS # £M Web = IF ( SELECTEDVALUE('Campaign Overview'[Type]) = "IN STORE", 0, ROUND ( DIVIDE ( SUM('Campaign Overview'[orders]), SUM('Campaign Overview'[salesPerMillion]) ), 2 ) )
@joluwa Try this .
ROS # £M Web = IF ( SELECTEDVALUE('Campaign Overview'[Type]) = "IN STORE", 0, ROUND ( DIVIDE ( SUM('Campaign Overview'[orders]), SUM('Campaign Overview'[salesPerMillion]) ), 2 ) )
@joluwa 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 @joluwa ,
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 @joluwa ,
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 @joluwa ,
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! | |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
61 |
User | Count |
---|---|
199 | |
120 | |
110 | |
79 | |
69 |