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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
curtislholt
New Member

Correlating MB and KB.

Hello,

 

Sorry I'm a newbie with Power BI and I'm still learning. I'm looking to create a chart to represent backup sizes of different sizes along a time line to show any spikes or such things. There is a column with the data type in like MB and KB  and then another with the size in ie 156 (mb). Obviously when i put these into the graph BI can't understand that KB and MB are different values I imagine because I haven't told it so. Whats the best way of me getting this data into a graph without having make all the values the same format.

 

Sorry if this sounds confusing I've explained it the best I can.

Regards

Curtis

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @curtislholt ,

 

As @amitchandak suggested, you could create a new value column with MB/KB type:

MB Size =
IF ( [Type] = "KB", [Value] / 1024, [Value] )

or

MB Size =
SWITCH ( [Type], "KB", [Value] / 1024, "MB", [Value] )

Or you could create measure instead like this:

KB Size =
IF (
    MAX ( 'Table'[Type] ) = "MB",
    MAX ( 'Table'[Value] ) * 1024,
    MAX ( 'Table'[Value] )
)

The final output is shown below:

1.11.2.1.PNG

Please take a look at the pbix file here.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @curtislholt ,

 

As @amitchandak suggested, you could create a new value column with MB/KB type:

MB Size =
IF ( [Type] = "KB", [Value] / 1024, [Value] )

or

MB Size =
SWITCH ( [Type], "KB", [Value] / 1024, "MB", [Value] )

Or you could create measure instead like this:

KB Size =
IF (
    MAX ( 'Table'[Type] ) = "MB",
    MAX ( 'Table'[Value] ) * 1024,
    MAX ( 'Table'[Value] )
)

The final output is shown below:

1.11.2.1.PNG

Please take a look at the pbix file here.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@curtislholt , I doubt I have seen that in formatting. May convert MB to KB

You can create new column like

New value= If([Type]="MB" = [value]*1024, [value])

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

Hello,

Thanks for the help so far, I've created a new column and put this foruma into the top but I'm getting the following error...

 

DAX comparison operations do not support comparing values of type True/False with values of type Number. Consider using the VALUE or FORMAT function to convert one of the values.

 

Any advice on a fix?

 

Cheers

Curtis

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.