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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Formulas produce multiple rows instead of single rows

I hope someone can please help me with this issue.  I have tables that Power BI does not relate correctly.

In my table visual, I am trying to get two dates on the same row so that I can subtract them.  However, the two dates appear on different rows.  I am getting double the rows in my visualization.   

For the data below, these are the two Calculated columns for the two dates:

Complete Intake Review = IF(AND('History: Case Detail'[Field]="Deal_Status__c",'History: Case Detail'[OldValue]="Intake Review"),'History: Case Detail'[CreatedDate].[Date],BLANK())

 

New Intake Review = IF(AND('History: Case Detail'[Field]="Deal_Status__c",'History: Case Detail'[NewValue]="Intake Review"),'History: Case Detail'[CreatedDate].[Date],BLANK())

 

These two dates are named the same -- CreatedDate and CreatedDate.   I use the Created Date when NewValue is filtered for “Intake Review” and I use the Created Date when OldValue is filtered for “Intake Review”.  The data source is Salesforce. The dates represent the beginning and end of a duration of time. 

I need them to appear on the same row so that I can subtract them. However, they appear on different rows in the visual.

The two tables “Case Detail” (the one) and “History:  Case Detail” (the many) are automatically many-to-one in the data model.  Case Detail[id) is a key and History: Case Detail[Parentid] is a key.  Cross filter direction is single pointing from Case Detail to  History:Case Detail.

Any suggestions are welcome.  Thank you.

 

August49_1-1653662631801.png

 

 

2 REPLIES 2
Anonymous
Not applicable

This is what the visual looks like.  I have not tried SELECTEDVALUE, but I will now.  Thanks.

 

August49_0-1653681591740.png

 

tamerj1
Super User
Super User

Hi @Anonymous 

how does your visual look like? Did you try to add these columns as measures using for example SELECTEDVALUE?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors