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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Rish2580
New Member

Dax search

Hello, I am trying  to develop a  dax query to search for data in a table. Basically the query should search for data in a table which has both integers and decimal values.  If I search "99" I should get all the records with 99 in it and if I search "99.99" I should get all the records with 99.99 (for example) can some please help me with the logic.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Rish2580 ,
Set the format of the power bi data as shown in the figure. A column in power bi can only have one data format.

vheqmsft_1-1707361627725.png

vheqmsft_2-1707361652951.png

If you want to do both, you can try merging these two pieces of code

EVALUATE
FILTER(
    'Table',
	'Table'[Whole number] = 99 ||
    ROUND('Table'[Decimal number], 2) = 99.99
)

vheqmsft_3-1707361706504.png

 

Best regards

Albert He

 

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

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Rish2580 ,
Based on your description, you can use the following functions in a dax query to accomplish your goal.

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1707360875511.png

Create dax query

 

EVALUATE
FILTER(
    'Table',
    'Table'[Whole number] = 99
)
EVALUATE
FILTER(
    'Table',
    ROUND('Table'[Decimal number], 2) = 99.99
)

 

Final output

vheqmsft_1-1707360964500.png

vheqmsft_2-1707360999217.png

 



Best regards

Albert He

 

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



Hello Alberto, thank you for responding. The numbers I gave was just an example. Should I use INT instead of the whole number? How can I use both the conditions in the same query as I need to search for the data in same table. 

Anonymous
Not applicable

Hi @Rish2580 ,
Set the format of the power bi data as shown in the figure. A column in power bi can only have one data format.

vheqmsft_1-1707361627725.png

vheqmsft_2-1707361652951.png

If you want to do both, you can try merging these two pieces of code

EVALUATE
FILTER(
    'Table',
	'Table'[Whole number] = 99 ||
    ROUND('Table'[Decimal number], 2) = 99.99
)

vheqmsft_3-1707361706504.png

 

Best regards

Albert He

 

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

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.