- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

HASONEVALUE CALCULATE COLUMN SUMX
Hi,
I need help with the following measure.
I need to the result of 36.2 (sum of 16.9 + 19.3) instead of what is given in the red circle.
Not sure why HASONEVALUE is not working in this case.
Coudl you help me to correct the issue ?
Thanks !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @cristianml ,
You can try to modify dax as follows:
NWD_2 =
IF(
HASONEVALUE('00_CALENDAR'[FY & Q]),
Sumx(
Values('00_CALENDAR'[FY & Q]),
IF([Rev Current Quarter]>0 && [NWD Value]>0, [NWD Value],blank()),
Blank())
Or You can create a measure.
Sum_Total =
VAR _table =
SUMMARIZE ( '00_CALENDAR', '00_CALENDAR'[FY & Q], "_value", [ NWD_2] )
RETURN
IF ( HASONEVALUE ( '00_CALENDAR'[FY & Q] ), [NWD_2], SUMX ( _table, [_value] )
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @cristianml ,
You can try to modify dax as follows:
NWD_2 =
IF(
HASONEVALUE('00_CALENDAR'[FY & Q]),
Sumx(
Values('00_CALENDAR'[FY & Q]),
IF([Rev Current Quarter]>0 && [NWD Value]>0, [NWD Value],blank()),
Blank())
Or You can create a measure.
Sum_Total =
VAR _table =
SUMMARIZE ( '00_CALENDAR', '00_CALENDAR'[FY & Q], "_value", [ NWD_2] )
RETURN
IF ( HASONEVALUE ( '00_CALENDAR'[FY & Q] ), [NWD_2], SUMX ( _table, [_value] )
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @littlemojopuppy ,
The HASONEVALUE is a very simple dax which returns TRUE when the context for column Name has been filtered to one distinct value only. Otherwise is FALSE.
Syntax: HASONEVALUE(<ColumnName>)
Parameter: It passes the name of an existing column. It cannot be an expression.
Return value : Boolean TRUE/FALSE
You can get the sample data and pbix from the below video in the description/comment section
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@powerbi_zone I'm not sure why this is directed to me, but it certainly seems like a commercial for something...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
08-18-2024 09:59 PM | |||
07-19-2022 12:02 PM | |||
08-05-2024 11:08 PM | |||
04-27-2024 03:07 AM | |||
Anonymous
| 01-13-2023 04:46 AM |
User | Count |
---|---|
136 | |
107 | |
88 | |
58 | |
46 |