Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi
I have a database table with a column named multimedia type which has 3 values - Video,Image,Other.
I want to create a Power BI Table for the category Video only.
I want to display the Multimedia File Name, Uploader Name, FileLength(in secs).
I don't want to use Power BI filters. So, I create a measure like so -
Total videos length (sec):=
CALCULATE (
SUM ( VaultAssets[FileLength] ),
FILTER ( VaultAssets, VaultAssets[VideoImageOther] = "Videos" )
)
When I put this measure as a column (alonng with other variables I mentioned above) in the Power BI table, I do get rows for only Videos. But the problem is that the actual database table (the source table) has Blanks for FileLength and this measure only displays rows with non blank FileLength values. I also tried other measures like -
Video Length(Secs):=SUMX(FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"),VaultAssets[FileLength])
VL:=
VAR fl = CALCULATE(SUM(VaultAssets[FileLength]),FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"))
Return
IF(fl=BLANK(),0,fl)
:=IF(CALCULATE (
SUM ( VaultAssets[FileLength] ),
FILTER ( VaultAssets, VaultAssets[VideoImageOther] = "Videos" )
) = BLANK(),0,
CALCULATE (
SUM ( VaultAssets[FileLength] ),
FILTER ( VaultAssets, VaultAssets[VideoImageOther] = "Videos" )
)
)
None of them gives correct number of rows
Summing it up: I want to create a measure for only Videos which when put in a power BI table visual, gives me all the rows including blanks.
Solved! Go to Solution.
If you just want number of rows, use COUNTROWS:
Videos =COUNTROWS(FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"))
Otherwise, to replace blank with zero, try:
Video Length(Secs):=SUMX(FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"),IF(ISBLANK(VaultAssets[FileLength]), 0, VaultAssets[FileLength]))
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
If you just want number of rows, use COUNTROWS:
Videos =COUNTROWS(FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"))
Otherwise, to replace blank with zero, try:
Video Length(Secs):=SUMX(FILTER(VaultAssets,VaultAssets[VideoImageOther]="Videos"),IF(ISBLANK(VaultAssets[FileLength]), 0, VaultAssets[FileLength]))
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.