Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
emembreno81
Frequent Visitor

Need Help Combining multiple Power BI formulas

hello!

 

I'm working on a report that is based off of a direct connect to an existing Power BI dataset.  I'm building new columns of data so that I can filter the information down and provide some indications to the team on what product still requires work to be done.  The formulas that I am trying to combine are all working to confirm whether a task as been done or not.  Unforunately, since I am doing a direct connect to a Power BI datasource, the new columns of information i've built then cannot be referenced in any new formulas, so I'm having to find creative ways to combine formulas so that I can filter out rows of data that don't require any work.  The formulas I'm combining are:

 

Missing BOM CC# = IF('rep v_asrt_mo_rep'[BOM CC #]=BLANK(), "INCOMPLETE", "COMPLETE")

 

Missing Style #(6 digits) = IF('rep v_asrt_mo_rep'[Legacy Style #] =BLANK(), "INCOMPLETE", "COMPLETE")

 

Missing CC # (9 digits) = IF('rep v_asrt_mo_rep'[Legacy CC #]=BLANK(), "INCOMPLETE", "COMPLETE")

 

Invalid Ticket Price = IF('rep v_asrt_mo_rep'[Primary Ticket Price]<0.01, "INCOMPLETE", "COMPLETE")

 

Invalid Color =

var _value =

if('rep v_asrt_mo_rep'[Color Short Description] = "" || 'rep v_asrt_mo_rep'[Color Short Description] = "tbd" , "INCOMPLETE","COMPLETE")

 

return

_value

 

I've tried combining on my end, but ended up getting an error message with this formula:

 

MI Exclude from Report Data (Y/N) =
var _value =
if('rep v_asrt_mo_rep'[BOM CC #]=BLANK() && 'rep v_asrt_mo_rep'[Legacy Style #] =BLANK() && 'rep v_asrt_mo_rep'[Legacy CC #]=BLANK() && 'rep v_asrt_mo_rep'[Primary Ticket Price]<0.01 && 'rep v_asrt_mo_rep'[Color Short Description] = "" || 'rep v_asrt_mo_rep'[Color Short Description] = "tbd" , "Y","N")

return
_value
 
I don't know if any of you have any suggestsions on how to make this formula work.  I would greatly appreciate any help!
1 ACCEPTED SOLUTION
emembreno81
Frequent Visitor

ah, ok - I was able to figure out something else that seemed to do the trick!  

View solution in original post

5 REPLIES 5
emembreno81
Frequent Visitor

ah, ok - I was able to figure out something else that seemed to do the trick!  

ToddChitt
Super User
Super User

The VAR / RETURN construct is handy if you need to calculate (read: Measures) something multiple times in a complex calculation. You can define it once, then reference it multiple times in the body, saves you from having to calculate it each time the formula comes across it :). 

Does not really help you here.

So what happens if you build the IF statement one element at a time? Or build it off other calculated columns?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





So that's part of the problem I keep running into - I want to build formulas off of the calculated columns that I've built, but they won't show up as one of the columns to work off of, so I keep having to find ways to combine the formulas from all of the calculated columns I've created.  I don't know if I'm missing a step to link those columns back into the data?

ToddChitt
Super User
Super User

Sounds like you are working with calculated COLUMNS, not MEASURES, correct? Are all these all in one table? What is the value of using the var _value / return _value structure? If each calculated column works OK, can you not reference it/them in the complex IF statement?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Hello Todd - Yes, I am working with calculated columns and not measures.  These are all in one table.  I am only using the var_value/return_value structure because it was what was in the original "Invalid Color" formula - I don't know if it's actually required in this new formula

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors