I have columns Like Date, ID, Total Space these are columns how to create a KB, GB Calculation.

Date: 22/03/2019

ID: 1, 2,3, 4

Total Space: 342.45 bn

Based above column how to create a dax caluculation?
Jun 18, 2020 in Power BI 3,965 views

1 answer to this question.

Hi, @Vnk

You can go through this regarding DAX calculation on KB and GB:

```Total Used Space =
VAR total =
SUM ( Table1[Used Space] ) + 0
RETURN
IF (
total < 1024,
FORMAT ( total, "#0.0# B" ),
IF (
total < POWER ( 2, 20 ),
FORMAT ( total / POWER ( 2, 10 ), "#0.0# KB" ),
IF (
total < POWER ( 2, 30 ),
FORMAT ( total / POWER ( 2, 20 ), "#0.0# MB" ),
FORMAT ( total / POWER ( 2, 30 ), "#0.0# GB" )
)
)
)```

Preparing for Power BI exam? Check out Power BI Syllabus now!

answered Jun 30, 2020 by
• 65,910 points

list reports with calculated percentage in Power BI using dax

Create a Measure called Total Revenue: Total Revenue = SUMX( ...READ MORE

How to rename a column using DAX in Power BI?

Hi Ramya, I found these two function that ...READ MORE

How to measure in DAX to calculate YTD for chosen month only for Power BI?

If you use the date column from FactTable, ...READ MORE

Distinct count filtered by condition using Power BI Dax

Try this, it should work: DistinctCountActiveMonths = CALCULATE( ...READ MORE

Assume referential integrity

1) What is Assume referential integrity? what ...READ MORE

If Condition

DAX - I assume [Claim_line].[Allowed_Amount_B6] is one ...READ MORE

How to export data to CSV from power bi embedded url ?

Hi Arathi, You can open Visuals from embedded ...READ MORE

+1 vote

Power Bi to Machine Learning Model

Hello @vnk! Power BI only supports Azure Machine ...READ MORE