Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to convert KB to TB on my dashboard, i found many solutions on internet like using this :
Taille = VAR Kilo =
SUM ( ExtractionFileSystem[FileSize] )
RETURN
SWITCH (
TRUE (),
ABS ( Kilo ) > 2 ^ 50, FORMAT ( DIVIDE ( Kilo, 2 ^ 50 ), "###.00 E" ) = VALUE(MAX()) ,
ABS ( Kilo ) > 2 ^ 40, FORMAT ( DIVIDE ( Kilo, 2 ^ 40 ), "###.00 Pb" ),
ABS ( Kilo ) > 2 ^ 30, FORMAT ( DIVIDE ( Kilo, 2 ^ 30 ), "###.00 Tb" ),
ABS ( Kilo ) > 2 ^ 20, FORMAT ( DIVIDE ( Kilo, 2 ^ 20 ), "###.00 Gb" ),
ABS ( Kilo ) > 2 ^ 10, FORMAT ( DIVIDE ( Kilo, 2 ^ 10 ), "###.00 Mb" ),
IF ( ABS ( Kilo ) <> BLANK (), FORMAT ( Kilo, "### Kb" ), BLANK () )
)
the problem is that on table the results is displayed correctly but not on a visual :
seems like a result is in varchar or something...
And last please can someone help me to convert that data to TB only ?
Thx for help 🙂
Solved! Go to Solution.
Hi @WBougerra,
If you convert your KB to TB by following the formula you attached, then you will get some Text data type values for they are combined by a numeric value and a unit of measurement. And for different visuals, they may have different requirements for the fields that they can receive. But for most visuals, they can receive numeric values.
You may try convert your KB to TB by the following Measure or Calculated column. And their results are some numeric values.
Measure: Convert TB = MAX('Table'[KB])*POWER(9.31,-10) //9.31×10-10 is the conversion value
Calculated column: KB Convert by Calcualted Column = 'Table'[KB]*POWER(9.31,-10)
In addition, there are some differences when you calculate by measure or calculate by Calculated column. For more details, you could refer to the following docs and blog.
Measures in Power BI Desktop - Power BI | Microsoft Docs
Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Docs
Calculated Column and Measure in Power BI (powerbiconsulting.com)
Here is the sample data and result.
Also, attached the pbix file.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best regards,
Community Support Team _ Caiyun
Hi @WBougerra,
If you convert your KB to TB by following the formula you attached, then you will get some Text data type values for they are combined by a numeric value and a unit of measurement. And for different visuals, they may have different requirements for the fields that they can receive. But for most visuals, they can receive numeric values.
You may try convert your KB to TB by the following Measure or Calculated column. And their results are some numeric values.
Measure: Convert TB = MAX('Table'[KB])*POWER(9.31,-10) //9.31×10-10 is the conversion value
Calculated column: KB Convert by Calcualted Column = 'Table'[KB]*POWER(9.31,-10)
In addition, there are some differences when you calculate by measure or calculate by Calculated column. For more details, you could refer to the following docs and blog.
Measures in Power BI Desktop - Power BI | Microsoft Docs
Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Docs
Calculated Column and Measure in Power BI (powerbiconsulting.com)
Here is the sample data and result.
Also, attached the pbix file.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best regards,
Community Support Team _ Caiyun
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |