cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## How to Using Logical Function in DAX and Display the Result with Actual Value

Hi Frnds,

I Created a Measure with existing tables and created a final result. In another Matrix Visual I would like to display the Final Result value which meets the Logical Function of Greater then 0 and Not Required if the Value fields which is less then or equal to 0.

Pending Dispatch = SUM(salesproj[projqty])-SUM('Stock and Sales'[Total Sale Qty])-SUM('Stock and Sales'[Total Stock Qty])>0

with this Condition I am able to See the Result as below. But I don't want True or False as result.

Please suggest me a DAX Measure.

1 ACCEPTED SOLUTION
Super User

Aha, then try this:

Pending Dispatch =
VAR =
_VALUE = SUM(salesproj[projqty])-SUM('Stock and Sales'[Total Sale Qty])-SUM('Stock and Sales'[Total Stock Qty])
RETURN
IF (_VALUE>0,_VALUE)
4 REPLIES 4
Super User

If not True/False, what do you expect?

Pending Dispatch =
IF ( SUM(salesproj[projqty])-SUM('Stock and Sales'[Total Sale Qty])-SUM('Stock and Sales'[Total Stock Qty])>0, 1)
Frequent Visitor

Please see the below snap shot.  Want this value instead of True in that condition and Not required the Field which is less then 0 (negative value) or False condition.

Ex: Refer the Column AHM in that want to display only the Row 2,4,6,7 and in AMB column want to display the Row 7,9,13 ....Viceversa... for the False statement column the result can show as blank or empty.

Super User

Aha, then try this:

Pending Dispatch =
VAR =
_VALUE = SUM(salesproj[projqty])-SUM('Stock and Sales'[Total Sale Qty])-SUM('Stock and Sales'[Total Stock Qty])
RETURN
IF (_VALUE>0,_VALUE)
Frequent Visitor

Thanks @FreemanZ , I got what I expect from your Answer.  Thank you so much.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors