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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dofrancis3
Resolver I
Resolver I

Mesure and Calendar table

Hi Colleagues!

I've created a "Calendar" table, but when I try to create a measure, "Calenda table" doesn't appear.

Could you help me to fixe this issue please.

In other words, when I call up "Calenda table" to create a measure, the table is not visible.
Kindly, advise.

Please see the print screen below:

 

dofrancis3_0-1707431031278.png

 

6 REPLIES 6
wynhopkins
Most Valuable Professional
Most Valuable Professional

You can't directly reference a table or column in a measure.  It's got to be wrapped in a function like a SUM, COUNTROWS, CALCULATE.    

what are you trying to do with the measure

MVP | Author of Power BI for the Excel Analyst | Speaker | Power BI & Excel Developer & Instructor | YouTube- 5 million views | Fan of Power Query & XLOOKUP | Purpose: Making life easier for people through applying and sharing knowledge.

I would like to calculate the pourcentage of status without "blank dates" and pourcentage "include blank dates"
below is my Mesure: 
% Status = DIVIDE([NbrPass], [NbrStatus], 'Calendar'[Date] = BLANK())
 
Knowing that:
NbrPass = CALCULATE(COUNTROWS(repository),repository[STATUS]= "Pass")
NbrStatus = CALCULATE(COUNTROWS(repository),repository[STATUS]= "Pass"||repository[STATUS]= "Fail")
dofrancis3_0-1707434481774.png

 


 

hi @dofrancis3 ,

 

This is what I used

 

 ----------------------------------------------------------------------------------------

Calendar table :

CALENDAR = CALENDAR("2023-01-01", "2024-12-31")

 ----------------------------------------------------------------------------------------

% Status without Blank Date =
VAR _TotalCount = CALCULATE( COUNT(FactTable[ID]), KEEPFILTERS(NOT(ISBLANK('CALENDAR'[Date]))) )
VAR _PassCount = CALCULATE( COUNT(FactTable[ID]), FactTable[Status] = "Pass" , KEEPFILTERS(NOT(ISBLANK('CALENDAR'[Date]))) )

RETURN DIVIDE( _PassCount, _TotalCount)

 ----------------------------------------------------------------------------------------

% Status with Blank Date =
VAR _SelYear = SELECTEDVALUE('CALENDAR'[YEAR])
VAR _TotalCount = CALCULATE( COUNT(FactTable[ID]) , REMOVEFILTERS('CALENDAR'[Date]), 'CALENDAR'[YEAR] = _SelYear || ISBLANK('CALENDAR'[YEAR]) )
VAR _PassCount = CALCULATE( COUNT(FactTable[ID]), FactTable[Status] = "Pass" , REMOVEFILTERS('CALENDAR'[Date]), 'CALENDAR'[YEAR] = _SelYear || ISBLANK('CALENDAR'[YEAR]))

RETURN DIVIDE( _PassCount, _TotalCount)

 ----------------------------------------------------------------------------------------

 

talespin_3-1707633643186.png

 

wynhopkins
Most Valuable Professional
Most Valuable Professional

Your Calendar table shouldn't have blank dates so don't reference that.


Number of records  =  COUNTROWS(repository)     
Q: is there  status other than pass or fail?

Blank Dates = CALCULATE( COUNTROWS(repository), ISBLANK(repository[Date Column]) )

Replace Date Column with whichever column you're checkin in the repository status

% = DIVIDE( [Blank Dates,  [Number of records])




MVP | Author of Power BI for the Excel Analyst | Speaker | Power BI & Excel Developer & Instructor | YouTube- 5 million views | Fan of Power Query & XLOOKUP | Purpose: Making life easier for people through applying and sharing knowledge.

Dear Coleagues;

I would like to Summarize "sampled" colomn only if the "date" is not blank 

Be low my mesure

Tot_sampled =
VAR __numberOfInterwd = SUM(LQASrepository[Total sampled),
                                            && LQASrepository[Start date] <> BLANK ())
RETURN
IF(ISBLANK(__numberOfInterwd), "No Data",__numberOfInterwd)
 
Please support
wynhopkins
Most Valuable Professional
Most Valuable Professional

I don't understand your question sorry

MVP | Author of Power BI for the Excel Analyst | Speaker | Power BI & Excel Developer & Instructor | YouTube- 5 million views | Fan of Power Query & XLOOKUP | Purpose: Making life easier for people through applying and sharing knowledge.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Users online (7,573)