Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Microsoft Power BI Community
- Forums
- Get Help with Power BI
- Desktop
- Help needed urgently DAX

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

Surya1

Helper I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-20-2018
09:32 AM

I have a table

Table

Col A Col B Col C

A. 1. 4/4/2018

A. 0. 4/4/2018

A. 2. 5/4/2018

A. 0. 6/4/2018

B. 2. 4/4/2018

B. 1. 5/4/2018

C. 0. 4/4/2018

C. 0. 6/4/2018

C. 1. 7/4/2018

D. 1. 7/4/2018

A date slicer having start date end date is applied on this table using a calendar table with date column having a relationship with the col C.I want to create a measure which sum the value of colb for the dates selected in the slicer under a particular col A.

If the slicer values are 4/4/2018 to 6/4/2018

A 3

B. 3

C 0

Also another measure,if the value of above measure is 0 then 0,if it is 1 then 1 if it is greater than 1 then 2

Can someone please help me.needed urgently

Table

Col A Col B Col C

A. 1. 4/4/2018

A. 0. 4/4/2018

A. 2. 5/4/2018

A. 0. 6/4/2018

B. 2. 4/4/2018

B. 1. 5/4/2018

C. 0. 4/4/2018

C. 0. 6/4/2018

C. 1. 7/4/2018

D. 1. 7/4/2018

A date slicer having start date end date is applied on this table using a calendar table with date column having a relationship with the col C.I want to create a measure which sum the value of colb for the dates selected in the slicer under a particular col A.

If the slicer values are 4/4/2018 to 6/4/2018

A 3

B. 3

C 0

Also another measure,if the value of above measure is 0 then 0,if it is 1 then 1 if it is greater than 1 then 2

Can someone please help me.needed urgently

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

v-xjiin-msft

Solution Sage

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2018
07:36 PM

Hi @Surya1

Please try following measures:

SUM ColB = CALCULATE ( SUM ( TableName[Col B] ), FILTER ( ALLSELECTED ( TableName ), TableName[Col A] = MAX ( TableName[Col A] ) ) )

Result = IF ( ISBLANK ( [SUM ColB] ), BLANK (), IF ( [SUM ColB] = 0, 0, IF ( [SUM ColB] = 1, 1, IF ( [SUM ColB] > 1, 2 ) ) ) )

Thanks,

Xi Jin.

1 REPLY 1

v-xjiin-msft

Solution Sage

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2018
07:36 PM

Hi @Surya1

Please try following measures:

SUM ColB = CALCULATE ( SUM ( TableName[Col B] ), FILTER ( ALLSELECTED ( TableName ), TableName[Col A] = MAX ( TableName[Col A] ) ) )

Result = IF ( ISBLANK ( [SUM ColB] ), BLANK (), IF ( [SUM ColB] = 0, 0, IF ( [SUM ColB] = 1, 1, IF ( [SUM ColB] > 1, 2 ) ) ) )

Thanks,

Xi Jin.

Announcements

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Visit our Community Blog for articles, guides, and information created by fellow community members.

Top Solution Authors

User | Count |
---|---|

372 | |

133 | |

84 | |

79 | |

79 |

Top Kudoed Authors

User | Count |
---|---|

492 | |

205 | |

156 | |

121 | |

105 |