Skip to main content
cancel
Showing results for 
Search instead 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

Reply
AA622
Helper II
Helper II

Switch between a Number and Currency within the same table

Hello

 

I am having issues switching formats of 2 values within the same table ie "Goal table'. We have to create a goals page for our Sales Reps and they are located within 1 table (goal table). They are all currency values with the exception of one (Goal Type1) which is a number representing new acquired accounts. We have had many goal types over the years and they are constantly changing based on needs of business. We tried to use the below short measure but the issue is that it would bring in allllll the old goal types. We then created the longer measure to specify each goal type but the issue is that the goal types may change next month so we would like to avoid having to constantly go back and changing the measure. We are looking for a measure that will be dynamic and doesnt need to be revisited every month.

 

Is the short measure missing something, perhaps another function?

Or is the long measure and constant revisiting the only option?

 

 

 

Short Measure = IF(max(GoalTable[ProductName]) = "GoalType1",

Format(GoalTable[MTDSalesToGoal],"General Number"),

Format(GoalTable[MTDSalesToGoal,"$0,000"))

 

 

Long Measure =

IF(max(GoalTable[ProductName]) = "GoalType1" ,Format(GoalTable[MTDSalesToGoal],"General Number"),

If(max(GoalTable[ProductName]) = "GoalType2",Format(GoalTable[MTDSalesToGoal],"$0,000"),

If(max(GoalTable[ProductName]) = "GoalType3",Format(GoalTable[MTDSalesToGoal],"$0,000"),

If(max(GoalTable[ProductName]) = "GoalType4",Format(GoalTable[MTDSalesToGoal],"$0,000"),

If(max(GoalTable[ProductName]) = "GoalType5",Format(GoalTable[MTDSalesToGoal],"$0,000"),

If(max(GoalTable[ProductName]) = "GoalType6",Format(GoalTable[MTDSalesToGoal],"$0,000"),

If(max(GoalTable[ProductName]) = "GoalType7",Format(GoalTable[MTDSalesToGoal],"$0,000"))))))))

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @AA622 ,

 

Are you saying that the column that need to show the numeric type is constantly changing each month? For example, this month is "GoalType1" and next month is "Type2".

 

If we don't have a condition to specify the corresponding column, then I don't think we can achieve dynamic update. So is there any feature to determine if a column needs to be displayed as the numeric type?

 

Best Regards,
Winniz

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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