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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RasmusLVF
Frequent Visitor

Creating 4 new measure based on "startswith" ?

Hi

I am trying to create 4 new measures based on a single value column - the problem is that my value column contains a bunch of units (energy consumption, volume, temperatures)

 

The differentiation is based on another column which defines the value type. I need to create calculations based on the values so I need to split them in difference columns.

 

RasmusLVF_0-1617965184752.png

 

I assume the calculation looks something like this:

"IF "startswith" 5.T1 THEN value = Measure1

"IF "startswith" 5.T2 THEN value = Measure2

"IF "startswith" 5.T4 THEN value = Measure3

"IF "startswith" 5.T5 THEN value = Measure4

 

Im pretty new in Powerbi coming from Tableau, any help is greatly appreciated.

Thanks 🤘

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@RasmusLVF 

 

This is not the way to do it. Use Power Query to shape the data correctly and then your DAX measures will be as easy as 1-2-3. If you don't know what the term "tidy data" means, then I'd suggest looking at What’s Tidy Data?. How to organize messy datasets in… | by Rodrigo Marino | Towards Data Science and/or Tidy data (r-project.org).

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@RasmusLVF 

 

This is not the way to do it. Use Power Query to shape the data correctly and then your DAX measures will be as easy as 1-2-3. If you don't know what the term "tidy data" means, then I'd suggest looking at What’s Tidy Data?. How to organize messy datasets in… | by Rodrigo Marino | Towards Data Science and/or Tidy data (r-project.org).

amitchandak
Super User
Super User

@RasmusLVF , Create measures like

 

Measure1 = calculate(sum(Table[Value]), filter(Table, left(Table[Column],3) = "5.T1"))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks alot, that didnt appear to return any values though.

 

Measure1 = calculate(sum('Readings'[value]), filter(Readings', left('Readings'[Series],3) = "5.T1"))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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