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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Lil789
Regular Visitor

filtering custom column values by range, and displaying the true value

Hello all,  I need your help!  

This below is a custom column I have to display fees:

Fees = IF(isblank(Enquiry_UDF[Total Fee Estimate]),IF(ISBLANK(Enquiry_UDF[AE Labour Fee]),Enquiry_UDF[Capital Value of Project],Enquiry_UDF[AE Labour Fee]),Enquiry_UDF[Total Fee Estimate])+0
 
I have also needed & created measures to count the number of transactions by various value ranges.  For example:
Under $10K = CALCULATE(DISTINCTCOUNT('Enquiry'[Proposal Code]),FILTER('Enquiry_UDF','Enquiry_UDF'[Fees]<10000))
 
Now I am trying to display the value of each transaction [Fees] by range:  For example:
unitunder 1010k-200k200k-1M
xyz$8,00018000400000 
yzz 130000  
zzz 190000  
sss$7,000 800000 

 

What I end up getting is:

unitunder 1010k-200k200k-1M
xyzTRUETRUETRUE 
yzz TRUE  
zzz TRUE  
sssTRUE TRUE 
 
test4 = If(Enquiry_UDF[Under $10K], TRUE(),
SELECTEDVALUE (Enquiry_UDF[Fees]))
 
I also tried to get Enquiry_UDF[Fees], using KEEPFITERS Enquiry_UDF [Under $10K]
I am new to this and very much appreciate your help!
7 REPLIES 7
Lil789
Regular Visitor

@sturlaws !  Thank you so much that solved the Segment issue!  I see the numbers are also accurate when I cross-reference them.  The Unit custom colum also pulls the accurate data.  However the segment value [individual fee value] isn't showing as your file does.  

 

current result:

Lil789_0-1653695406494.png

 

Lil789_1-1653695491259.png

 

Measure after your correction:

Lil789_2-1653695561768.png

 

Unit Column:

Lil789_3-1653695621706.png

expected result:

Lil789_4-1653695656503.png

[similar to the result on your file].  😥

 

 

 

Hi @Lil789 ,

 

Is that these tables with relationship between them? "unit" and "Segment" should be in different tables and these tables have no relationship.

 

Or you can share the pbix file with fake data if you need more help.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Lil789
Regular Visitor

@sturlaws , thank you so much for sharing that method!  I believe I followed it but kept getting errors... please take a look at this when you can?  

Lil789_0-1653681869575.png

 

This is the error I get:

Lil789_1-1653682017984.png

This is the table

Lil789_2-1653682102093.pngLil789_3-1653682146225.png

Can you help me correct the errors please?

 

Thanks!

 

 

It might be because you have an unclosed paranthesis:

sturlaws_0-1653686878717.png

Try removing one of those opening paranthesis

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download the PBI file.  Why is the FEE measure a series of IF() functions?  Ideally shouldn't that be a SUM() function?  I am conused.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

Thank you for your quick response Ashish, the reason the Fee measure is a series is - it is get data from this column, and if null go to this other column, and if data doesn't exist there go to this last column.  The file contains company confidential data so I can't share as-is.  I will strip off and send if I don't get a resolution.  

 

What I need is, once the Fee value is obtained [and that measure works now], to report it by department, by value range like this in a table:

Lil789_4-1653682783255.png

 

sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Lil789,

I think you can solve your issue using the method described here: https://www.daxpatterns.com/dynamic-segmentation/ 

I have created a sample report, based on the information you provided and the method from the URL.

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.