Forum Discussion
Need help calculating Null and No null values in column
- 7 years ago
Hi parry2k
Test with this data
First Create a calculated column
year/weeknum = YEAR(Table1[Date])&"-"&WEEKNUM(Table1[Date],2)
Then Create two measures
count not null =
CALCULATE(COUNT(Table1[Date]),FILTER(ALLSELECTED(Table1),Table1[year/weeknum]=MAX(Table1[year/weeknum])&&Table1[Test Number]<>BLANK())) count null =
CALCULATE(COUNT(Table1[Date]),FILTER(ALLSELECTED(Table1),Table1[year/weeknum]=MAX(Table1[year/weeknum])&&Table1[Test Number]=BLANK()))Add them to a line chart
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous so you want to show value in card visual 11 divided by 20 from this example data? correcT?
parry2k Maybe my example needs more elaboration than I thought. There is another column called “Week.” So, I want to be able to create a chart like the one below which will show the blue line to be the number of cells with data (Test_#) by week and yellow line that indicates the number of empty cells by week. Test to No Test Ratio for week 1 would be 6/2
Week | Test Number |
week1 | Test_03 |
week1 | Test_15 |
week1 | Test_16 |
week1 | |
week1 | Test_04 |
week1 | |
week1 | Test_01 |
week1 | Test_02 |
week2 | |
week2 | Test_08 |
week2 | |
week2 | Test_09 |
week2 | Test_10 |
week2 | Test_11 |
week2 | |
week2 | |
week3 | |
week3 | Test_14 |
week3 | |
week3 | Test_12 |
week3 | Test_13 |
week3 | |
week4 | Test_17 |
week4 | Test_18 |
week4 | Test_19 |
week4 | Test_20 |
week4 | |
week4 | |
week4 | Test_05 |
week4 | Test_06 |
week4 | Test_07 |
Test to No Test Ratio
Test to No Test Ratio