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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dofrancis3
Helper III
Helper III

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.