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
FredLEGUEN
Helper III
Helper III

Search between 2 account number

Hi community,

 

I'm building a report for an accounting company

Most of the DAX measures are easy to write. Like this one

CALCULATE([SommeC];SourceAccess[Comptes]="74000000")

 

But some measures must calculate the sum for all the values between 2 account number.

My account numbers are in text format in my source file. So I can't write a measure like this

CALCULATE([SommeC];SourceAccess[Comptes]>="64110000"||SourceAccess[Comptes]<="64145000")

 

Any thoughts?

4 REPLIES 4
v-angzheng-msft
Community Support
Community Support

May I ask if your problem has been solved? Is the above answer helpful to you?
If it helps, could you please mark the response which help as Answered since it is working now? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.

FredLEGUEN
Helper III
Helper III

Hi @amolrs ,

You're right

With Power Query, I just had to duplicate the column and change the format column.

Now, I have to correct most of my measures 😉 

@FredLEGUEN , you can change the data type for the existing column itself. Then you will not have to correct your existing measures.

amolrs
Frequent Visitor

Hi @FredLEGUEN ,

 

How about changing the data type of Account Number to Whole Number and then trying the formula you suggested.

 

The formula needs to be changed to include the && operator instead of || to something like:

CALCULATE([SommeC];SourceAccess[Comptes]>="64110000" && SourceAccess[Comptes]<="64145000")

 

Cheers,

Amol

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.