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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MikeKP72
New Member

Multiply a single value in a table by Zero

Good evening, I have 1 report that contains the balance for a list of projects. I want to simulate that one or several projects are zeroed, that is to say that the balance is multiplied by zero, only to some of the selected projects. I tried with SWITCH but it applies the zero to all the projects and not only to the selected ones. thanks for the help.

1 ACCEPTED SOLUTION

Hi @MikeKP72 ,

 

Try to use ALLSELECTED function

I create a seperate table to put [ID]. There's no relationship between two tables.

Table 2 = DISTINCT('Table'[ID])

9.png10.png

 

Measure is like

Measure = IF(MAX('Table'[ID]) IN ALLSELECTED('Table 2'[ID]),0,SUM('Table'[Value]))

 

The [ID] in the slicer is from Table 2.

12.png

 

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
MikeKP72
New Member

@amitchandak, Thanks for the tip, it helped me.
I still have to solve that selecting from that new table 2 or more projects does not work. The selectvalue is for single selections? Thanks

Hi @MikeKP72 ,

 

Try to use ALLSELECTED function

I create a seperate table to put [ID]. There's no relationship between two tables.

Table 2 = DISTINCT('Table'[ID])

9.png10.png

 

Measure is like

Measure = IF(MAX('Table'[ID]) IN ALLSELECTED('Table 2'[ID]),0,SUM('Table'[Value]))

 

The [ID] in the slicer is from Table 2.

12.png

 

 

Best Regards,

Stephen Tao

 

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

Thanks Stephen.

It helped me to solve the problem, and thanks for the example.

Regards

amitchandak
Super User
Super User

@MikeKP72 , for this you need an independent project table and you need to select a project from there

 

a mesure like. example

if(max(Table[project]) = selectedvalue(Project[Project]) , 0, sum(Table[Value])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.